org.nuiton.io.rest
Class RestSession

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

public class RestSession
extends java.lang.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
 java.io.InputStream askData(RestRequest request)
           
 void close()
           
 org.apache.commons.httpclient.HttpMethod doRequest(RestRequest request)
           
protected  org.apache.commons.httpclient.HttpConnection getConnection()
           
protected  java.lang.String getUri(java.lang.String... paths)
           
protected  void releaseConnection(org.apache.commons.httpclient.HttpConnection connection)
           
 java.io.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 java.io.InputStream askData(RestRequest request)
                            throws RestException,
                                   java.io.IOException
Throws:
RestException
java.io.IOException

sendData

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

setOpen

public void setOpen(boolean open)

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

releaseConnection

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

getConnection

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

getUri

protected java.lang.String getUri(java.lang.String... paths)

doRequest

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


Copyright © 2009-2010 CodeLutin. All Rights Reserved.