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