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 voidaddHeader(java.lang.String key, java.lang.String value)Adds HTTP headers.voidclose()Close/free the connection, using keepalive if appropriate.abstract voiddestroy()Destroy/disconnect the connectionjava.lang.StringgetContentEncoding()Returns the content encodingabstract java.io.InputStreamgetInputStream()Returns the InputStream to the resultabstract java.io.OutputStreamgetOutputStream()Returns the output stream for the request.abstract intgetStatusCode()Returns the status code.abstract java.lang.StringgetStatusMessage()Returns the status string.abstract voidsendRequest()Sends the query
-
-
-
Method Detail
-
addHeader
public void addHeader(java.lang.String key, java.lang.String value)Adds HTTP headers.- Specified by:
addHeaderin interfaceHessianConnection
-
getOutputStream
public abstract java.io.OutputStream getOutputStream() throws java.io.IOExceptionReturns the output stream for the request.- Specified by:
getOutputStreamin interfaceHessianConnection- Throws:
java.io.IOException
-
sendRequest
public abstract void sendRequest() throws java.io.IOExceptionSends the query- Specified by:
sendRequestin interfaceHessianConnection- Throws:
java.io.IOException
-
getStatusCode
public abstract int getStatusCode()
Returns the status code.- Specified by:
getStatusCodein interfaceHessianConnection
-
getStatusMessage
public abstract java.lang.String getStatusMessage()
Returns the status string.- Specified by:
getStatusMessagein interfaceHessianConnection
-
getInputStream
public abstract java.io.InputStream getInputStream() throws java.io.IOExceptionReturns the InputStream to the result- Specified by:
getInputStreamin interfaceHessianConnection- Throws:
java.io.IOException
-
getContentEncoding
public java.lang.String getContentEncoding()
Description copied from interface:HessianConnectionReturns the content encoding- Specified by:
getContentEncodingin interfaceHessianConnection
-
close
public void close() throws java.io.IOExceptionClose/free the connection, using keepalive if appropriate.- Specified by:
closein interfaceHessianConnection- Throws:
java.io.IOException
-
destroy
public abstract void destroy() throws java.io.IOExceptionDestroy/disconnect the connection- Specified by:
destroyin interfaceHessianConnection- Throws:
java.io.IOException
-
-