com.caucho.hessian.client
Class AbstractHessianConnection

java.lang.Object
  extended by com.caucho.hessian.client.AbstractHessianConnection
All Implemented Interfaces:
HessianConnection
Direct Known Subclasses:
HessianURLConnection

public abstract class AbstractHessianConnection
extends java.lang.Object
implements HessianConnection

Internal connection to a server. The default connection is based on java.net


Constructor Summary
AbstractHessianConnection()
           
 
Method Summary
 void addHeader(java.lang.String key, java.lang.String value)
          Adds HTTP headers.
 void close()
          Close/free the connection, using keepalive if appropriate.
abstract  void destroy()
          Destroy/disconnect the connection
abstract  java.io.InputStream getInputStream()
          Returns the InputStream to the result
abstract  java.io.OutputStream getOutputStream()
          Returns the output stream for the request.
abstract  int getStatusCode()
          Returns the status code.
abstract  java.lang.String getStatusMessage()
          Returns the status string.
abstract  void sendRequest()
          Sends the query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHessianConnection

public AbstractHessianConnection()
Method Detail

addHeader

public void addHeader(java.lang.String key,
                      java.lang.String value)
Adds HTTP headers.

Specified by:
addHeader in interface HessianConnection

getOutputStream

public abstract java.io.OutputStream getOutputStream()
                                              throws java.io.IOException
Returns the output stream for the request.

Specified by:
getOutputStream in interface HessianConnection
Throws:
java.io.IOException

sendRequest

public abstract void sendRequest()
                          throws java.io.IOException
Sends the query

Specified by:
sendRequest in interface HessianConnection
Throws:
java.io.IOException

getStatusCode

public abstract int getStatusCode()
Returns the status code.

Specified by:
getStatusCode in interface HessianConnection

getStatusMessage

public abstract java.lang.String getStatusMessage()
Returns the status string.

Specified by:
getStatusMessage in interface HessianConnection

getInputStream

public abstract java.io.InputStream getInputStream()
                                            throws java.io.IOException
Returns the InputStream to the result

Specified by:
getInputStream in interface HessianConnection
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Close/free the connection, using keepalive if appropriate.

Specified by:
close in interface HessianConnection
Throws:
java.io.IOException

destroy

public abstract void destroy()
                      throws java.io.IOException
Destroy/disconnect the connection

Specified by:
destroy in interface HessianConnection
Throws:
java.io.IOException