com.googlecode.xremoting.core.commonshttpclient
Class CommonsHttpClientRequest

java.lang.Object
  extended by com.googlecode.xremoting.core.commonshttpclient.CommonsHttpClientRequest
All Implemented Interfaces:
Request

public class CommonsHttpClientRequest
extends Object
implements Request

Implementation of Request for commons-httpclient.

Author:
Roman Puchkovskiy
See Also:
CommonsHttpClientRequester

Constructor Summary
CommonsHttpClientRequest(org.apache.commons.httpclient.HttpClient httpClient, org.apache.commons.httpclient.methods.PostMethod method)
           
 
Method Summary
protected  void checkStatusCode(org.apache.commons.httpclient.methods.PostMethod method)
           
 void commitRequest()
          Commits a request.
 InputStream getInputStream()
          Returns InputStream from which user may get response data.
 OutputStream getOutputStream()
          Returns OutputStream to which user may send request data.
 void releaseRequest()
          Releases resources claimed by request (closes connections, etc.).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonsHttpClientRequest

public CommonsHttpClientRequest(org.apache.commons.httpclient.HttpClient httpClient,
                                org.apache.commons.httpclient.methods.PostMethod method)
Method Detail

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Description copied from interface: Request
Returns OutputStream to which user may send request data.

Specified by:
getOutputStream in interface Request
Returns:
output stream
Throws:
IOException - if i/o error occurs

commitRequest

public void commitRequest()
                   throws IOException
Description copied from interface: Request
Commits a request. That is, changes request state to the one in which no data may be sent to remote side, and data may be got from remote side.

Specified by:
commitRequest in interface Request
Throws:
IOException - if i/o error occurs

checkStatusCode

protected void checkStatusCode(org.apache.commons.httpclient.methods.PostMethod method)
                        throws IOException
Throws:
IOException

getInputStream

public InputStream getInputStream()
                           throws IOException
Description copied from interface: Request
Returns InputStream from which user may get response data.

Specified by:
getInputStream in interface Request
Returns:
input stream
Throws:
IOException - if i/o error occurs

releaseRequest

public void releaseRequest()
Description copied from interface: Request
Releases resources claimed by request (closes connections, etc.).

Specified by:
releaseRequest in interface Request


Copyright © 2011. All Rights Reserved.