org.jwall.web.audit.util
Class Timestamp

java.lang.Object
  extended by stream.AbstractProcessor
      extended by org.jwall.web.audit.util.Timestamp
All Implemented Interfaces:
stream.Processor, stream.StatefulProcessor

public class Timestamp
extends stream.AbstractProcessor

This simple processor adds a timestamp (current time in milliseconds) to all processed data items.

Author:
Christian Bockermann <chris@jwall.org>

Constructor Summary
Timestamp()
           
Timestamp(String key, String format, String from)
           
 
Method Summary
 String getFormat()
           
 String getFrom()
           
 String getKey()
           
 void init(stream.ProcessContext ctx)
           
 stream.data.Data process(stream.data.Data data)
           
 void setFormat(String format)
           
 void setFrom(String from)
           
 void setKey(String key)
           
 
Methods inherited from class stream.AbstractProcessor
finish, resetState
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Timestamp

public Timestamp()

Timestamp

public Timestamp(String key,
                 String format,
                 String from)
Method Detail

getKey

public String getKey()
Returns:
the key

setKey

public void setKey(String key)
Parameters:
key - the key to set

getFormat

public String getFormat()
Returns:
the format

setFormat

public void setFormat(String format)
Parameters:
format - the format to set

getFrom

public String getFrom()
Returns:
the from

setFrom

public void setFrom(String from)
Parameters:
from - the from to set

process

public stream.data.Data process(stream.data.Data data)
See Also:
stream.DataProcessor#process(stream.data.Data)

init

public void init(stream.ProcessContext ctx)
          throws Exception
Specified by:
init in interface stream.StatefulProcessor
Overrides:
init in class stream.AbstractProcessor
Throws:
Exception
See Also:
stream.AbstractProcessor#init()


Copyright © 2012 jwall.org. All Rights Reserved.