Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » catalina » cluster » tcp » [javadoc | source]
org.apache.catalina.cluster.tcp
public class: ReplicationValve [javadoc | source]
java.lang.Object
   org.apache.catalina.valves.ValveBase
      org.apache.catalina.cluster.tcp.ReplicationValve

All Implemented Interfaces:
    ClusterValve, Valve, MBeanRegistration, Contained

Implementation of a Valve that logs interesting contents from the specified Request (before processing) and the corresponding Response (after processing). It is especially useful in debugging problems related to headers and cookies.

This Valve may be attached to any Container, depending on the granularity of the logging you wish to perform.

primaryIndicator=true, then the request attribute org.apache.catalina.cluster.tcp.isPrimarySession. is set true, when request processing is at sessions primary node.

Field Summary
protected static  StringManager sm    The StringManager for this package. 
protected  Pattern[] reqFilters    holds file endings to not call for like images and others 
protected  String filter     
protected  long totalRequestTime     
protected  long totalSendTime     
protected  long nrOfRequests     
protected  long lastSendTime     
protected  long nrOfFilterRequests     
protected  boolean primaryIndicator     
protected  String primaryIndicatorName     
Fields inherited from org.apache.catalina.valves.ValveBase:
container,  containerLog,  info,  next,  sm,  domain,  oname,  mserver,  controller
Constructor:
 public ReplicationValve() 
Method from org.apache.catalina.cluster.tcp.ReplicationValve Summary:
createPrimaryIndicator,   getCluster,   getFilter,   getInfo,   getLastSendTime,   getNrOfFilterRequests,   getNrOfRequests,   getPrimaryIndicatorName,   getReqFilters,   getTotalRequestTime,   getTotalSendTime,   invoke,   isPrimaryIndicator,   isRequestWithoutSessionChange,   resetStatistics,   sendInvalidSessions,   sendSessionReplicationMessage,   setCluster,   setFilter,   setPrimaryIndicator,   setPrimaryIndicatorName,   setReqFilters,   toString,   updateStats
Methods from org.apache.catalina.valves.ValveBase:
backgroundProcess,   createObjectName,   event,   getContainer,   getContainerName,   getController,   getDomain,   getInfo,   getNext,   getObjectName,   getParentName,   invoke,   postDeregister,   postRegister,   preDeregister,   preRegister,   setContainer,   setController,   setNext,   setObjectName,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.catalina.cluster.tcp.ReplicationValve Detail:
 protected  void createPrimaryIndicator(Request request) throws IOException 
    Mark Request that processed at primary node with attribute primaryIndicatorName
 public CatalinaCluster getCluster() 
 public String getFilter() 
 public String getInfo() 
    Return descriptive information about this Valve implementation.
 public long getLastSendTime() 
 public long getNrOfFilterRequests() 
 public long getNrOfRequests() 
 public String getPrimaryIndicatorName() 
 protected Pattern[] getReqFilters() 
 public long getTotalRequestTime() 
 public long getTotalSendTime() 
 public  void invoke(Request request,
    Response response) throws IOException, ServletException 
    Log the interesting request parameters, invoke the next Valve in the sequence, and log the interesting response parameters.
 public boolean isPrimaryIndicator() 
 protected boolean isRequestWithoutSessionChange(String uri) 
    is request without possible session change
 public  void resetStatistics() 
    reset the active statitics
 protected  void sendInvalidSessions(ClusterManager manager,
    CatalinaCluster cluster) 
    check for session invalidations
 protected  void sendSessionReplicationMessage(Request request,
    ClusterManager manager,
    CatalinaCluster cluster) 
    Send Cluster Replication Request
 public  void setCluster(CatalinaCluster cluster) 
 public  void setFilter(String filter) 
    compile filter string to regular expressions
 public  void setPrimaryIndicator(boolean primaryIndicator) 
 public  void setPrimaryIndicatorName(String primaryIndicatorName) 
 protected  void setReqFilters(Pattern[] reqFilters) 
 public String toString() 
    Return a String rendering of this object.
 protected synchronized  void updateStats(long requestTime,
    long clusterTime) 
    protocol cluster replications stats