More information: http://www.cs.berkeley.edu/~mdw/proj/seda/

seda.sandStorm.lib.http
Class httpResponder

java.lang.Object
  |
  +--seda.sandStorm.lib.http.httpResponder
All Implemented Interfaces:
httpConst, QueueElementIF

public class httpResponder
extends java.lang.Object
implements httpConst, QueueElementIF

This class is used to wrap an HTTP response along with the connection which it is destined for.

Author:
Matt Welsh
See Also:
httpResponse, httpConnection

Fields inherited from interface seda.sandStorm.lib.http.httpConst
CRLF, DEFAULT_HTTP_PORT, HTTP_VERSION, WRITE_CLOG_THRESHOLD
 
Constructor Summary
httpResponder(httpResponse resp, httpConnection conn)
          Create an httpResponder with the given response and connection.
httpResponder(httpResponse resp, httpConnection conn, boolean closeConnection)
          Create an httpResponder with the given response and connection.
httpResponder(httpResponse resp, httpConnection conn, boolean closeConnection, boolean sendHeader)
          Create an httpResponder with the given response and connection.
httpResponder(httpResponse resp, httpRequest req)
          Create an httpResponder with the given response, with the connection being derived from the given request.
httpResponder(httpResponse resp, httpRequest req, boolean closeConnection)
          Create an httpResponder with the given response, with the connection being derived from the given request.
httpResponder(httpResponse resp, httpRequest req, boolean closeConnection, boolean sendHeader)
          Create an httpResponder with the given response, with the connection being derived from the given request.
 
Method Summary
 httpConnection getConnection()
          Return the connection for this responder.
 httpResponse getResponse()
          Return the response for this responder.
 boolean sendHeader()
          Returns whether the response header should be sent.
 boolean shouldClose()
          Returns whether the connection should be closed after sending this response.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

httpResponder

public httpResponder(httpResponse resp,
                     httpConnection conn,
                     boolean closeConnection,
                     boolean sendHeader)
Create an httpResponder with the given response and connection.
Parameters:
closeConnection - Indicate that the connection should be closed after sending this response.
sendHeader - Indicate that the header of the response should be sent along with the payload.

httpResponder

public httpResponder(httpResponse resp,
                     httpConnection conn,
                     boolean closeConnection)
Create an httpResponder with the given response and connection.
Parameters:
closeConnection - Indicate that the connection should be closed after sending this response.

httpResponder

public httpResponder(httpResponse resp,
                     httpConnection conn)
Create an httpResponder with the given response and connection.

httpResponder

public httpResponder(httpResponse resp,
                     httpRequest req,
                     boolean closeConnection,
                     boolean sendHeader)
Create an httpResponder with the given response, with the connection being derived from the given request.
Parameters:
closeConnection - Indicate that the connection should be closed after sending this response.
sendHeader - Indicate that the header of the response should be sent along with the payload.

httpResponder

public httpResponder(httpResponse resp,
                     httpRequest req,
                     boolean closeConnection)
Create an httpResponder with the given response, with the connection being derived from the given request.
Parameters:
closeConnection - Indicate that the connection should be closed after sending this response.

httpResponder

public httpResponder(httpResponse resp,
                     httpRequest req)
Create an httpResponder with the given response, with the connection being derived from the given request.
Method Detail

getConnection

public httpConnection getConnection()
Return the connection for this responder.

getResponse

public httpResponse getResponse()
Return the response for this responder.

shouldClose

public boolean shouldClose()
Returns whether the connection should be closed after sending this response.

sendHeader

public boolean sendHeader()
Returns whether the response header should be sent.

More information: http://www.cs.berkeley.edu/~mdw/proj/seda/