org.norther.tammi.spray.connector.chain
Class AbstractConnectorRequest.ConnectorRequestExtension

java.lang.Object
  extended by org.norther.tammi.spray.filter.chain.AbstractExtension
      extended by org.norther.tammi.spray.connector.chain.AbstractConnectorRequest.ConnectorRequestExtension
All Implemented Interfaces:
Serializable, EventListener, ConnectorExtension, Extension, ServletRequestBindingListener
Enclosing class:
AbstractConnectorRequest

protected class AbstractConnectorRequest.ConnectorRequestExtension
extends AbstractExtension
implements ConnectorExtension

The connector extension class.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.norther.tammi.spray.connector.chain.ConnectorExtension
KEY
 
Constructor Summary
AbstractConnectorRequest.ConnectorRequestExtension()
          Constructs a new extension.
 
Method Summary
 void connected()
          Marks this request as connected.
 boolean containsComment(String name)
          Checks whether a named comment exists.
 String getComment(String name)
          Gets a named comment.
 Map getCommentMap()
          Gets a map of comments.
 Connection getConnection()
          Gets the connection of this request.
 long getConnectionTime()
          Gets the connection time of this request.
 String getProvider()
          Gets the provider of this connection.
 int getRedirectPort()
          Gets the redirect port of this connection.
 int getStatus()
          Gets the status of the response of this request.
 float getVersion()
          Gets the version of the protocol.
 boolean isKeepConnection()
          Checks whether connections should be kept alive.
 void removeComment(String name)
          Removes a named comment.
 void setComment(String name, String value)
          Sets a named comment.
 void setKeepConnection(boolean alive)
          Sets whether connections should be kept alive.
 void setStatus(int code)
          Sets the status of the response of this request.
 void valueBound(ServletRequestBindingEvent event)
          Notifies the object that it is being bound to a request.
 void valueUnbound(ServletRequestBindingEvent event)
          Notifies the object that it is being unbound from a request.
 
Methods inherited from class org.norther.tammi.spray.filter.chain.AbstractExtension
getFilterChain, getFilteredRequest, getFilteredResponse, isBound
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractConnectorRequest.ConnectorRequestExtension

public AbstractConnectorRequest.ConnectorRequestExtension()
Constructs a new extension.

Method Detail

getProvider

public String getProvider()
Description copied from interface: ConnectorExtension
Gets the provider of this connection.

Specified by:
getProvider in interface ConnectorExtension
Returns:
the name of the provider.

getVersion

public float getVersion()
Description copied from interface: ConnectorExtension
Gets the version of the protocol.

Specified by:
getVersion in interface ConnectorExtension
Returns:
the protocol version.

getRedirectPort

public int getRedirectPort()
Description copied from interface: ConnectorExtension
Gets the redirect port of this connection.

Specified by:
getRedirectPort in interface ConnectorExtension
Returns:
the redirect port number.

getConnectionTime

public long getConnectionTime()
Description copied from interface: ConnectorExtension
Gets the connection time of this request.

Specified by:
getConnectionTime in interface ConnectorExtension
Returns:
the connection time in msecs.

connected

public void connected()
Description copied from interface: ConnectorExtension
Marks this request as connected.

Specified by:
connected in interface ConnectorExtension

isKeepConnection

public boolean isKeepConnection()
Description copied from interface: ConnectorExtension
Checks whether connections should be kept alive.

Specified by:
isKeepConnection in interface ConnectorExtension
Returns:
true to keep connections alive, false otherwise.

setKeepConnection

public void setKeepConnection(boolean alive)
Description copied from interface: ConnectorExtension
Sets whether connections should be kept alive.

Specified by:
setKeepConnection in interface ConnectorExtension
Parameters:
alive - true to keep connections alive, false otherwise.

getComment

public String getComment(String name)
Description copied from interface: ConnectorExtension
Gets a named comment.

Specified by:
getComment in interface ConnectorExtension
Parameters:
name - the name of the comment.
Returns:
the comment value or null.

setComment

public void setComment(String name,
                       String value)
Description copied from interface: ConnectorExtension
Sets a named comment. The comments are included in the access log entry of this request.

Specified by:
setComment in interface ConnectorExtension
Parameters:
name - the name of the comment.
value - the value of the comment.

containsComment

public boolean containsComment(String name)
Description copied from interface: ConnectorExtension
Checks whether a named comment exists.

Specified by:
containsComment in interface ConnectorExtension
Parameters:
name - the name of the comment.
Returns:
true or false.

removeComment

public void removeComment(String name)
Description copied from interface: ConnectorExtension
Removes a named comment.

Specified by:
removeComment in interface ConnectorExtension
Parameters:
name - the name of the comment.

getCommentMap

public Map getCommentMap()
Description copied from interface: ConnectorExtension
Gets a map of comments. The map is a copy of the original comments.

Specified by:
getCommentMap in interface ConnectorExtension
Returns:
the map of comments.

getStatus

public int getStatus()
Description copied from interface: ConnectorExtension
Gets the status of the response of this request.

Specified by:
getStatus in interface ConnectorExtension
Returns:
the status code.

setStatus

public void setStatus(int code)
Description copied from interface: ConnectorExtension
Sets the status of the response of this request. Only requests with a status will be logged.

Specified by:
setStatus in interface ConnectorExtension
Parameters:
code - the status code.

getConnection

public Connection getConnection()
Description copied from interface: ConnectorExtension
Gets the connection of this request.

Specified by:
getConnection in interface ConnectorExtension
Returns:
the connection.

valueBound

public void valueBound(ServletRequestBindingEvent event)
Description copied from interface: ServletRequestBindingListener
Notifies the object that it is being bound to a request.

Specified by:
valueBound in interface ServletRequestBindingListener
Overrides:
valueBound in class AbstractExtension
Parameters:
event - the binding event.

valueUnbound

public void valueUnbound(ServletRequestBindingEvent event)
Description copied from interface: ServletRequestBindingListener
Notifies the object that it is being unbound from a request.

Specified by:
valueUnbound in interface ServletRequestBindingListener
Overrides:
valueUnbound in class AbstractExtension
Parameters:
event - the binding event.


Copyright © 2004 The Norther Organization. All rights reserved.