org.norther.tammi.spray.servlet.chain
Class ServletConnection

java.lang.Object
  extended by org.norther.tammi.core.pool.RecyclableSupport
      extended by org.norther.tammi.core.pool.PoolableSupport
          extended by org.norther.tammi.spray.connector.chain.AbstractConnection
              extended by org.norther.tammi.spray.connector.chain.InterConnection
                  extended by org.norther.tammi.spray.servlet.chain.ServletConnection
All Implemented Interfaces:
Closeable, Serializable, Runnable, Poolable, Recyclable, Connection

public class ServletConnection
extends InterConnection

A connection through a servlet.

Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.norther.tammi.spray.connector.chain.Connection
BUSY, DONE, IDLE, IN_QUEUE, INITIAL
 
Constructor Summary
ServletConnection(MBeanReference connector, MBeanReference filter, MBeanReference logger, MBeanReference timeout, Thread thread, ServletRequest req, ServletResponse res)
          Constructs a new connection for the specified servlet.
 
Method Summary
 void dispose()
          Disposes the object by setting its disposed flag.
 int getByteCount()
          Gets the number of bytes written to this connection.
 String getRemoteAddr()
          Gets the remote address of this connection.
 int getRemotePort()
          Gets the remote port of this connection.
 void recycle(MBeanReference connector, MBeanReference filter, MBeanReference logger, MBeanReference timeout, Thread thread, ServletRequest req, ServletResponse res)
          Recycles a connection for the specified servlet.
 
Methods inherited from class org.norther.tammi.spray.connector.chain.InterConnection
filter, getPeerCertificates, getRequest, getResponse, isKeepConnection, toString
 
Methods inherited from class org.norther.tammi.spray.connector.chain.AbstractConnection
close, connected, disposed, getConnectionStatus, getConnectionTime, getConnectionTimeout, getConnector, getFilter, getLogger, getMBeanServer, getReadyOps, getRequestTimeout, getTimeout, isContextThread, 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

ServletConnection

public ServletConnection(MBeanReference connector,
                         MBeanReference filter,
                         MBeanReference logger,
                         MBeanReference timeout,
                         Thread thread,
                         ServletRequest req,
                         ServletResponse res)
Constructs a new connection for the specified servlet.

Parameters:
connector - the connector.
filter - the active filter.
logger - the active logger.
timeout - the active timeout.
thread - the connector thread.
req - a request to decorate.
res - a response to decorate.
Method Detail

recycle

public void recycle(MBeanReference connector,
                    MBeanReference filter,
                    MBeanReference logger,
                    MBeanReference timeout,
                    Thread thread,
                    ServletRequest req,
                    ServletResponse res)
Recycles a connection for the specified servlet.

Overrides:
recycle in class InterConnection
Parameters:
connector - the connector.
filter - the active filter.
logger - the active logger.
timeout - the active timeout.
thread - the connector thread.
req - a request to decorate.
res - a response to decorate.

dispose

public void dispose()
Description copied from class: RecyclableSupport
Disposes the object by setting its disposed flag.

Specified by:
dispose in interface Recyclable
Overrides:
dispose in class InterConnection

getRemotePort

public int getRemotePort()
Description copied from interface: Connection
Gets the remote port of this connection.

Specified by:
getRemotePort in interface Connection
Overrides:
getRemotePort in class InterConnection
Returns:
the remote port.

getRemoteAddr

public String getRemoteAddr()
Description copied from interface: Connection
Gets the remote address of this connection.

Specified by:
getRemoteAddr in interface Connection
Overrides:
getRemoteAddr in class InterConnection
Returns:
the remote address.

getByteCount

public int getByteCount()
Description copied from interface: Connection
Gets the number of bytes written to this connection.

Specified by:
getByteCount in interface Connection
Overrides:
getByteCount in class InterConnection
Returns:
the number of bytes written.


Copyright © 2004 The Norther Organization. All rights reserved.