SAP NetWeaver '04

com.sapportals.wcm.util.http.slim
Class SlimRequesterFactory

[contained in: com.sap.netweaver.bc.util.par - bc.util.public_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.util.http.slim.SlimRequesterFactory
All Implemented Interfaces:
IRequesterFactory

public final class SlimRequesterFactory
extends java.lang.Object
implements IRequesterFactory

Implementation of IWDRequesterFactory for the slim package.

SlimRequesterFactory is caching IWDRequester objects per IWDContext. There is a maximum number of cached (not constructed) objects per context. Requester objects time out after a while and are removed. There is not limit on the number of IWDRequester per context, however when requester are released, only a certain number is kept for further use.

See SlimRequester for information about open connections.

Copyright (c) SAP AG 2001-2003


Constructor Summary
SlimRequesterFactory()
           
 
Method Summary
 java.lang.String getAbsoluteURL(java.lang.String uri)
           
 HttpUrl getBase()
           
 IContext getContext(java.lang.Object key)
           
 int getPort()
           
 HttpUrl getProxy()
           
 IRequester getRequester(IContext context)
           
 int getSoTimeout()
          Returns the timeout used for socket operations.
 void setBaseURL(java.lang.String url)
          Set the base URL for this factory.
 void setMaxConnections(int max)
          Set the maximum number of concurrent connections.
 void setProxyInfo(IProxyInfo info)
          Sets the proxy information to use by this factory.
 void setSoTimeout(int ms)
          Sets the timeout for socket operations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SlimRequesterFactory

public SlimRequesterFactory()
Method Detail

getAbsoluteURL

public java.lang.String getAbsoluteURL(java.lang.String uri)
Specified by:
getAbsoluteURL in interface IRequesterFactory
Parameters:
uri - TBD: Description of the incoming method parameter
Returns:
the full URL for the given relative URI

getProxy

public HttpUrl getProxy()

getRequester

public IRequester getRequester(IContext context)
                        throws WcmException
Specified by:
getRequester in interface IRequesterFactory
Following copied from interface: com.sapportals.wcm.util.http.IRequesterFactory
Parameters:
context - needed for authorized connections or null for anonymous requests
Returns:
IWDRequester for the given context.
Throws:
WcmException - Exception raised in failure situation

getContext

public IContext getContext(java.lang.Object key)
Specified by:
getContext in interface IRequesterFactory
Following copied from interface: com.sapportals.wcm.util.http.IRequesterFactory
Parameters:
key - TBD: Description of the incoming method parameter
Returns:
a IWDContext for the given key (e.g. username)

getPort

public int getPort()
Specified by:
getPort in interface IRequesterFactory
Returns:
the port number

setBaseURL

public void setBaseURL(java.lang.String url)
                throws java.net.MalformedURLException
Description copied from interface: IRequesterFactory
Set the base URL for this factory. Needs to be called before first requester is retrieved and should not be changed afterwards.
Specified by:
setBaseURL in interface IRequesterFactory
Following copied from interface: com.sapportals.wcm.util.http.IRequesterFactory
Parameters:
url - baseURL to be set
Throws:
java.net.MalformedURLException - Exception raised in failure situation

getBase

public HttpUrl getBase()
Specified by:
getBase in interface IRequesterFactory
Following copied from interface: com.sapportals.wcm.util.http.IRequesterFactory
Returns:
the installed base URL

setProxyInfo

public void setProxyInfo(IProxyInfo info)
Sets the proxy information to use by this factory.
Specified by:
setProxyInfo in interface IRequesterFactory
Parameters:
info - proxyInfo to be set

setSoTimeout

public void setSoTimeout(int ms)
Description copied from interface: IRequesterFactory
Sets the timeout for socket operations. A value of 0 means inifinite wait.
Specified by:
setSoTimeout in interface IRequesterFactory
Following copied from interface: com.sapportals.wcm.util.http.IRequesterFactory
Parameters:
ms - soTimeout to be set

getSoTimeout

public int getSoTimeout()
Description copied from interface: IRequesterFactory
Returns the timeout used for socket operations. A timeout value of 0 means infinite timeout.
Specified by:
getSoTimeout in interface IRequesterFactory
Following copied from interface: com.sapportals.wcm.util.http.IRequesterFactory
Returns:
the timeout (milliseconds) used for socket operations

setMaxConnections

public void setMaxConnections(int max)
Description copied from interface: IRequesterFactory
Set the maximum number of concurrent connections.
Specified by:
setMaxConnections in interface IRequesterFactory
Following copied from interface: com.sapportals.wcm.util.http.IRequesterFactory
Parameters:
max - maximum number of connections

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.