SAP NetWeaver '04

com.sapportals.wcm.util.http
Interface IRequester

[contained in: com.sap.netweaver.bc.util.par - bc.util.public_api.jar]
public interface IRequester

Requester have the main task to perform HTTP requests and return IWDResponses. A requester can be used for a series of request until released or closed.

Releasing a requester might make it available for further reuse. Closing a requester explicitly disallows reuse. This might be necessary when there is trouble with a request or, for example, when the response body needs to be discarded.

Note that requester objects are not multithread safe.

Copyright (c) SAP AG 2001-2002


Method Summary
 void close()
          Close the requester and disallow reuse.
 int getSoTimeout()
          Returns the timeout used for socket operations.
 IResponse perform(IRequest request)
          Send a HTTP request to the remote server and deliver the response back to the caller.
 void release()
          Release this requester and make it available for reuse.
 void setSoTimeout(int ms)
          Sets the timeout for socket operations.
 

Method Detail

perform

public IResponse perform(IRequest request)
                  throws WcmException
Send a HTTP request to the remote server and deliver the response back to the caller.
Parameters:
request - the HTTP request to perform
Returns:
repsonse from the server
Throws:
WcmException - on trouble with connection

release

public void release()
Release this requester and make it available for reuse.

close

public void close()
Close the requester and disallow reuse. The underlying connection will be closed.

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

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.