Package com.caucho.hessian.client
Class AbstractHessianConnection
- java.lang.Object
-
- 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
Constructors Constructor Description AbstractHessianConnection()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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 connectionjava.lang.String
getContentEncoding()
Returns the content encodingabstract java.io.InputStream
getInputStream()
Returns the InputStream to the resultabstract 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
-
-
-
Method Detail
-
addHeader
public void addHeader(java.lang.String key, java.lang.String value)
Adds HTTP headers.- Specified by:
addHeader
in interfaceHessianConnection
-
getOutputStream
public abstract java.io.OutputStream getOutputStream() throws java.io.IOException
Returns the output stream for the request.- Specified by:
getOutputStream
in interfaceHessianConnection
- Throws:
java.io.IOException
-
sendRequest
public abstract void sendRequest() throws java.io.IOException
Sends the query- Specified by:
sendRequest
in interfaceHessianConnection
- Throws:
java.io.IOException
-
getStatusCode
public abstract int getStatusCode()
Returns the status code.- Specified by:
getStatusCode
in interfaceHessianConnection
-
getStatusMessage
public abstract java.lang.String getStatusMessage()
Returns the status string.- Specified by:
getStatusMessage
in interfaceHessianConnection
-
getInputStream
public abstract java.io.InputStream getInputStream() throws java.io.IOException
Returns the InputStream to the result- Specified by:
getInputStream
in interfaceHessianConnection
- Throws:
java.io.IOException
-
getContentEncoding
public java.lang.String getContentEncoding()
Description copied from interface:HessianConnection
Returns the content encoding- Specified by:
getContentEncoding
in interfaceHessianConnection
-
close
public void close() throws java.io.IOException
Close/free the connection, using keepalive if appropriate.- Specified by:
close
in interfaceHessianConnection
- Throws:
java.io.IOException
-
destroy
public abstract void destroy() throws java.io.IOException
Destroy/disconnect the connection- Specified by:
destroy
in interfaceHessianConnection
- Throws:
java.io.IOException
-
-