|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Connection
An interface to connections maintaining communication channels to clients.
Note that the close and setReadySet methods may be called from other threads during connection execution and must thus be thread safe.
Nested Class Summary | |
---|---|
static class |
Connection.Status
The connection status. |
Method Summary | |
---|---|
void |
busy()
Resets the status of this connection to busy during time-consuming requests. |
void |
close()
Closes this connection and stops execution. |
void |
connected()
Sets the status of this connection to busy after idle. |
int |
filter()
Filters the request of this connection. |
int |
getByteCount()
Gets the number of bytes written to this connection. |
Connection.Status |
getConnectionStatus()
Gets the connection status of this connection. |
long |
getConnectionTime()
Gets the connection time of this connection. |
int |
getConnectionTimeout()
Gets the connection timeout of this connection. |
Connector |
getConnector()
Gets the connector of this connection. |
Filter |
getFilter()
Gets the filter of this connection. |
Logger |
getLogger()
Gets the logger of this connection. |
MBeanServer |
getMBeanServer()
Gets the MBean server of this connection. |
Certificate[] |
getPeerCertificates()
Gets the client certificate chain, if available. |
int |
getReadyOps()
Gets the ready operations set of this connection. |
String |
getRemoteAddr()
Gets the remote address of this connection. |
int |
getRemotePort()
Gets the remote port of this connection. |
ServletRequest |
getRequest()
Gets of the request of this connection. |
int |
getRequestTimeout()
Gets the request timeout of this connection. |
ServletResponse |
getResponse()
Gets of the response of this connection. |
Timeout |
getTimeout()
Gets the timer of this connection. |
boolean |
isConnected()
Checks whether this connection is still connected. |
boolean |
isContextThread()
Checks whether this connection executes in a connector context thread. |
boolean |
isKeepConnection()
Checks whether to keep this connection alive in idle after request processing. |
boolean |
keepConnection()
Keeps this connection alive in idle after processing request processing if applicable. |
void |
log()
Logs the request of this connection, if applicable |
void |
setReadyOps(int ops)
Sets the ready operations set of this connection. |
boolean |
waitUntilDone(int msecs)
Waits until this the execution of connection is done. |
Methods inherited from interface java.lang.Runnable |
---|
run |
Method Detail |
---|
Connector getConnector()
Filter getFilter()
Logger getLogger()
Timeout getTimeout()
MBeanServer getMBeanServer()
boolean isContextThread()
boolean isConnected()
Connection.Status getConnectionStatus()
long getConnectionTime()
void connected()
void busy()
int getRequestTimeout()
int getConnectionTimeout()
int getReadyOps()
void setReadyOps(int ops)
Note that this method must be thread safe and not causing deadlocks as it may be called by several threads during channel selections.
ops
- the operations set as a bit mask.boolean isKeepConnection()
boolean keepConnection()
int getByteCount()
int getRemotePort()
String getRemoteAddr()
ServletRequest getRequest()
ServletResponse getResponse()
Certificate[] getPeerCertificates()
int filter() throws ServletException, IOException
ServletException
- for servlet errors.
IOException
- for general errors.boolean waitUntilDone(int msecs)
msecs
- a timeout to wait in msecs.
void close()
Note that this method must be thread safe and not causing deadlocks as it may be called by several threads during timeouts.
close
in interface Closeable
void log()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |