|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IHttpConnection
A http connection (session) between two http client and http server.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.xsocket.connection.IConnection |
---|
IConnection.FlushMode |
Field Summary | |
---|---|
static int |
DEFAULT_CONNECT_TIMEOUT_MILLIS
|
static long |
DEFAULT_DATA_RESPONSE_TIMEOUT_MILLIS
|
static long |
DEFAULT_RESPONSE_TIMEOUT_MILLIS
|
Fields inherited from interface org.xsocket.connection.IConnection |
---|
DEFAULT_AUTOFLUSH, DEFAULT_CONNECTION_TIMEOUT_MILLIS, DEFAULT_FLUSH_MODE, DEFAULT_IDLE_TIMEOUT_MILLIS, INITIAL_DEFAULT_ENCODING, MAX_TIMEOUT_MILLIS, SO_KEEPALIVE, SO_LINGER, SO_RCVBUF, SO_REUSEADDR, SO_SNDBUF, SO_TIMEOUT, TCP_NODELAY |
Method Summary | |
---|---|
void |
activateSecuredMode()
ad hoc activation of a secured mode (SSL). |
void |
addConnectionHandler(IHttpConnectionHandler connectionHandler)
adds a connection handler |
void |
closeQuitly()
closes this connection by swallowing io exceptions |
void |
destroy()
closes the connection in a unlean way |
long |
getBodyDataReceiveTimeoutMillis()
returns body data receive timeout |
INonBlockingConnection |
getUnderlyingTcpConnection()
returns the underlying tcp connection |
Executor |
getWorkerpool()
return the worker pool which is used to process the call back methods |
boolean |
isPersistent()
returns if the connection is persistent |
boolean |
isReceivingSuspended()
returns true if receiving is suspended |
boolean |
isSecure()
returns if the connection is in secured mode |
void |
removeConnectionHandler(IHttpConnectionHandler connectionHandler)
removes a connectrion handler |
void |
resumeReceiving()
resume receiving data from the underlying subsystem |
void |
setBodyDataReceiveTimeoutMillis(long bodyDataReceiveTimeoutMillis)
set the body data receive timeout |
void |
setWriteTransferRate(int bytesPerSecond)
set the send delay time. |
void |
suspendReceiving()
suspend receiving data from the underlying subsystem |
Methods inherited from interface org.xsocket.connection.IConnection |
---|
getAttachment, getConnectionTimeoutMillis, getId, getIdleTimeoutMillis, getLocalAddress, getLocalPort, getOption, getOptions, getRemainingMillisToConnectionTimeout, getRemainingMillisToIdleTimeout, getRemoteAddress, getRemotePort, isOpen, isServerSide, setAttachment, setConnectionTimeoutMillis, setIdleTimeoutMillis, setOption |
Methods inherited from interface java.io.Closeable |
---|
close |
Field Detail |
---|
static final int DEFAULT_CONNECT_TIMEOUT_MILLIS
static final long DEFAULT_RESPONSE_TIMEOUT_MILLIS
static final long DEFAULT_DATA_RESPONSE_TIMEOUT_MILLIS
Method Detail |
---|
boolean isPersistent()
void activateSecuredMode() throws IOException
IOException
- If some other I/O error occursboolean isSecure()
void setWriteTransferRate(int bytesPerSecond) throws ClosedChannelException, IOException
INonBlockingConnection#setFlushmode(org.xsocket.connection.IConnection.FlushMode))
bytesPerSecond
- the transfer rate of the outgoing data
ClosedChannelException
- If the underlying socket is already closed
IOException
- If some other I/O error occursExecutor getWorkerpool()
void suspendReceiving() throws IOException
IOException
- If some other I/O error occursboolean isReceivingSuspended()
void resumeReceiving() throws IOException
IOException
- If some other I/O error occurslong getBodyDataReceiveTimeoutMillis()
void setBodyDataReceiveTimeoutMillis(long bodyDataReceiveTimeoutMillis)
bodyDataReceiveTimeoutMillis
- the timeoutvoid addConnectionHandler(IHttpConnectionHandler connectionHandler)
connectionHandler
- the connection handlervoid removeConnectionHandler(IHttpConnectionHandler connectionHandler)
connectionHandler
- the connection handlerINonBlockingConnection getUnderlyingTcpConnection()
void closeQuitly()
void destroy()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |