org.norther.tammi.spray.connector.chain
Class ConnectorResponse

java.lang.Object
  extended by javax.servlet.ServletResponseWrapper
      extended by org.norther.tammi.spray.filter.chain.ServletResponseWrapper
          extended by org.norther.tammi.spray.connector.chain.AbstractConnectorResponse
              extended by org.norther.tammi.spray.connector.chain.ConnectorResponse
All Implemented Interfaces:
EventListener, ServletResponse, Poolable, Recyclable, FilterChainListener

public class ConnectorResponse
extends AbstractConnectorResponse

A default implementation of the connector response implementing raw stream support.

Author:
Ilkka Priha

Constructor Summary
ConnectorResponse()
          Constructs a new response.
ConnectorResponse(OutputStream out)
          Constructs a new response with a stream.
 
Method Summary
 void dispose()
          Disposes the object after use.
 void disposed()
          A call back indicating that this instance is not needed any more and can be disposed.
protected  OutputStream getRawOutputStream()
          Gets the raw output stream.
 void recycle(OutputStream out)
          Recycles a response with a stream.
 
Methods inherited from class org.norther.tammi.spray.connector.chain.AbstractConnectorResponse
flushBuffer, getBufferSize, getByteCount, getCharacterEncoding, getContentType, getLocale, getOutputStream, getWriter, isCommitted, reset, resetBuffer, setBufferSize, setCharacterEncoding, setContentLength, setContentType, setLocale
 
Methods inherited from class org.norther.tammi.spray.filter.chain.ServletResponseWrapper
completed, filtered, getExtension, getFilterChain, getFilteredRequest, getFilteredResponse, isDisposed, recycle, recycle, recycled
 
Methods inherited from class javax.servlet.ServletResponseWrapper
getResponse, setResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectorResponse

public ConnectorResponse()
Constructs a new response.


ConnectorResponse

public ConnectorResponse(OutputStream out)
Constructs a new response with a stream.

Parameters:
out - an output stream to the client.
Method Detail

recycle

public void recycle(OutputStream out)
Recycles a response with a stream.

Parameters:
out - an output stream to the client.

dispose

public void dispose()
Description copied from interface: Recyclable
Disposes the object after use. The method is called when the object is returned to its pool. The dispose method must call its super.

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

disposed

public void disposed()
Description copied from interface: Poolable
A call back indicating that this instance is not needed any more and can be disposed.

Specified by:
disposed in interface Poolable
Overrides:
disposed in class AbstractConnectorResponse

getRawOutputStream

protected OutputStream getRawOutputStream()
Description copied from class: AbstractConnectorResponse
Gets the raw output stream.

Specified by:
getRawOutputStream in class AbstractConnectorResponse
Returns:
the raw output stream or null.


Copyright © 2004 The Norther Organization. All rights reserved.