|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.pool.RecyclableSupport
org.norther.tammi.core.pool.PoolableSupport
org.norther.tammi.spray.connector.chain.AbstractConnection
org.norther.tammi.spray.connector.chain.SocketConnection
public class SocketConnection
A connection through a socket.
| Field Summary |
|---|
| Fields inherited from interface org.norther.tammi.spray.connector.chain.Connection |
|---|
BUSY, DONE, IDLE, IN_QUEUE, INITIAL |
| Constructor Summary | |
|---|---|
SocketConnection(MBeanReference connector,
MBeanReference filter,
MBeanReference logger,
MBeanReference timeout,
Thread thread,
Socket socket)
Constructs a new connection. |
|
| Method Summary | |
|---|---|
void |
close()
Closes this connection and stops execution. |
void |
dispose()
Disposes the object by setting its disposed flag. |
int |
filter()
Filters the request of this connection. |
int |
getByteCount()
Gets the number of bytes written to this connection. |
Certificate[] |
getPeerCertificates()
Gets the client certificate chain, if available. |
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. |
ServletResponse |
getResponse()
Gets of the response of this connection. |
Socket |
getSocket()
Gets the socket of this connection. |
void |
recycle(MBeanReference connector,
MBeanReference filter,
MBeanReference logger,
MBeanReference timeout,
Thread thread,
Socket socket)
Recycles an existing connection. |
String |
toString()
|
| Methods inherited from class org.norther.tammi.spray.connector.chain.AbstractConnection |
|---|
connected, disposed, getConnectionStatus, getConnectionTime, getConnectionTimeout, getConnector, getFilter, getLogger, getMBeanServer, getReadyOps, getRequestTimeout, getTimeout, isContextThread, isKeepConnection, keepConnection, log, recycle, run, setReadyOps, waitUntilDone |
| Methods inherited from class org.norther.tammi.core.pool.PoolableSupport |
|---|
recycled |
| Methods inherited from class org.norther.tammi.core.pool.RecyclableSupport |
|---|
isDisposed, recycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.norther.tammi.core.pool.Recyclable |
|---|
isDisposed, recycle |
| Constructor Detail |
|---|
public SocketConnection(MBeanReference connector,
MBeanReference filter,
MBeanReference logger,
MBeanReference timeout,
Thread thread,
Socket socket)
connector - the socket connector.filter - the active filter.logger - the active logger.timeout - the active timeout.thread - the connector thread.socket - the socket.| Method Detail |
|---|
public void recycle(MBeanReference connector,
MBeanReference filter,
MBeanReference logger,
MBeanReference timeout,
Thread thread,
Socket socket)
connector - the socket connector.filter - the active filter.logger - the active logger.timeout - the active timeout.thread - the connector thread.socket - the socket.public void dispose()
RecyclableSupport
dispose in interface Recyclabledispose in class AbstractConnectionpublic int getByteCount()
Connection
public int getRemotePort()
Connection
public String getRemoteAddr()
Connection
public ServletRequest getRequest()
Connection
public ServletResponse getResponse()
Connection
public Certificate[] getPeerCertificates()
Connection
public int filter()
throws ServletException,
IOException
Connection
ServletException - for servlet errors.
IOException - for general errors.public void close()
ConnectionNote that this method must be thread safe and not causing deadlocks as it may be called by several threads during timeouts.
close in interface Closeableclose in interface Connectionclose in class AbstractConnectionpublic String toString()
toString in class Objectpublic Socket getSocket()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||