com.sapportals.wcm.util.http

Interface IRequester


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

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

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


close

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


getSoTimeout

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

void setSoTimeout(int ms)
Sets the timeout for socket operations. A value of 0 means inifinite wait.

Parameters:
ms - soTimeout to be set
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice