org.jwall.audit.processor
Class DefaultRequestHost

java.lang.Object
  extended by org.jwall.audit.processor.DefaultRequestHost
All Implemented Interfaces:
EventProcessor<AuditEvent>

public class DefaultRequestHost
extends Object
implements EventProcessor<AuditEvent>

This simple event processor fills in a default host value for events that do not come with a request header including a Host:-field.

Author:
Christian Bockermann <chris@jwall.org>

Field Summary
 
Fields inherited from interface org.jwall.audit.EventProcessor
DELETE_FLAG
 
Constructor Summary
DefaultRequestHost()
           
 
Method Summary
 String getValue()
          A simple getter for the default host value.
 AuditEvent processEvent(AuditEvent event, Map<String,Object> context)
          This method is called upon event reception.
 void setValue(String defaultHost)
          A simple setter for the default host value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRequestHost

public DefaultRequestHost()
Method Detail

processEvent

public AuditEvent processEvent(AuditEvent event,
                               Map<String,Object> context)
                        throws Exception
Description copied from interface: EventProcessor
This method is called upon event reception. The given map provides a context to communicate data between several event-processors. The implementor of this interface needs to take care that calls to this class my come from different threads, i.e. no state should be stored in the class to diminish the risk of concurrency problems.

Specified by:
processEvent in interface EventProcessor<AuditEvent>
Returns:
Throws:
Exception
See Also:
EventProcessor.processEvent(org.jwall.audit.Event, java.util.Map)

getValue

public String getValue()
A simple getter for the default host value.

Returns:

setValue

public void setValue(String defaultHost)
A simple setter for the default host value.

Parameters:
defaultHost -


Copyright © 2012 jwall.org. All Rights Reserved.