org.nuiton.io.rest
Class RestSession

java.lang.Object
  extended by org.nuiton.io.rest.RestSession

public class RestSession
extends Object

A REST session.

Since:
1.0.3
Author:
chemit

Field Summary
protected  org.apache.commons.httpclient.HttpClient client
           
protected  RestClientConfiguration configuration
           
protected static org.apache.commons.logging.Log log
           
protected  boolean open
           
protected  boolean showRequest
           
 
Method Summary
 InputStream askData(RestRequest request)
           
 void close()
           
 org.apache.commons.httpclient.HttpMethod doRequest(RestRequest request)
           
protected  org.apache.commons.httpclient.HttpConnection getConnection()
           
protected  String getUri(String... paths)
           
protected  void releaseConnection(org.apache.commons.httpclient.HttpConnection connection)
           
 InputStream sendData(RestRequest request)
           
 void setOpen(boolean open)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

client

protected org.apache.commons.httpclient.HttpClient client

log

protected static final org.apache.commons.logging.Log log

open

protected boolean open

showRequest

protected boolean showRequest

configuration

protected RestClientConfiguration configuration
Method Detail

askData

public InputStream askData(RestRequest request)
                    throws RestException,
                           IOException
Throws:
RestException
IOException

sendData

public InputStream sendData(RestRequest request)
                     throws RestException,
                            IOException
Throws:
RestException
IOException

setOpen

public void setOpen(boolean open)

close

public void close()
           throws IOException
Throws:
IOException

releaseConnection

protected void releaseConnection(org.apache.commons.httpclient.HttpConnection connection)

getConnection

protected org.apache.commons.httpclient.HttpConnection getConnection()

getUri

protected String getUri(String... paths)

doRequest

public org.apache.commons.httpclient.HttpMethod doRequest(RestRequest request)
                                                   throws IOException
Throws:
IOException


Copyright © 2009-2010 CodeLutin. All Rights Reserved.