org.abstracthorizon.danube.support.logging.patternsupport
Class HandlingTimeProcessor

java.lang.Object
  extended by org.abstracthorizon.danube.support.logging.patternsupport.HandlingTimeProcessor
All Implemented Interfaces:
PatternProcessor

public class HandlingTimeProcessor
extends Object
implements PatternProcessor

This processor adds %D and %T parameters handling. %D is amount of milliseconds connection handling lasted while &T shows the same time in seconds

Author:
Daniel Sendula

Field Summary
protected  int millisIndex
          Cached index of milliseconds parameter
protected  int secsIndex
          Cached index of seconds parameter
 
Constructor Summary
HandlingTimeProcessor()
          Constructor
 
Method Summary
 int init(int index, StringBuffer message)
          Checks if parameters are present and if so replaces it and caches their indexes
 void process(Connection connection, Object[] array)
          Adds parameter values to cached index positions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

millisIndex

protected int millisIndex
Cached index of milliseconds parameter


secsIndex

protected int secsIndex
Cached index of seconds parameter

Constructor Detail

HandlingTimeProcessor

public HandlingTimeProcessor()
Constructor

Method Detail

init

public int init(int index,
                StringBuffer message)
Checks if parameters are present and if so replaces it and caches their indexes

Specified by:
init in interface PatternProcessor
Parameters:
index - next index to be used
message - message to be altered

process

public void process(Connection connection,
                    Object[] array)
Adds parameter values to cached index positions

Specified by:
process in interface PatternProcessor
Parameters:
connection - connection
array - array


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.