SAP NetWeaver '04

com.sapportals.wcm.util.http
Interface IRequesterFactory

[contained in: com.sap.netweaver.bc.util.par - bc.util.public_api.jar]
All Known Implementing Classes:
SlimRequesterFactory

public interface IRequesterFactory

A requester factory is able to handle out new IWDRequester for a given base URL. Context information can be supplied when the connection to the remote URL requires Authorization.

For efficient reuse of requester, it is best to acquire the IWDContext objects through the factory interface. At the moment there is only support for user/password Authorization in this interface.

Copyright (c) SAP AG 2001-2002


Method Summary
 java.lang.String getAbsoluteURL(java.lang.String uri)
           
 HttpUrl getBase()
           
 IContext getContext(java.lang.Object key)
           
 int getPort()
           
 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.
 

Method Detail

getBase

public HttpUrl getBase()
Returns:
the installed base URL

getPort

public int getPort()
Returns:
the port number

getAbsoluteURL

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

getContext

public IContext getContext(java.lang.Object key)
Parameters:
key - TBD: Description of the incoming method parameter
Returns:
a IWDContext for the given key (e.g. username)

setBaseURL

public void setBaseURL(java.lang.String url)
                throws java.net.MalformedURLException
Set the base URL for this factory. Needs to be called before first requester is retrieved and should not be changed afterwards.
Parameters:
url - baseURL to be set
Throws:
java.net.MalformedURLException - Exception raised in failure situation

setProxyInfo

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

getRequester

public IRequester getRequester(IContext context)
                        throws WcmException
Parameters:
context - needed for authorized connections or null for anonymous requests
Returns:
IWDRequester for the given context.
Throws:
WcmException - Exception raised in failure situation

getSoTimeout

public int getSoTimeout()
Returns the timeout used for socket operations. A timeout value of 0 means infinite timeout.
Returns:
the timeout (milliseconds) used for socket operations

setSoTimeout

public void setSoTimeout(int ms)
Sets the timeout for socket operations. A value of 0 means inifinite wait.
Parameters:
ms - soTimeout to be set

setMaxConnections

public void setMaxConnections(int max)
Set the maximum number of concurrent connections.
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.