org.alfresco.bm.event
Class AbstractEventProcessor

java.lang.Object
  extended by org.alfresco.bm.event.AbstractEventProcessor
All Implemented Interfaces:
EventProcessor, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware
Direct Known Subclasses:
AuthenticatedHttpEventProcessor, CreateUsers, DoNothingEventProcessor, PrepareUsers, RaiseEventsEventProcessor, ResultBarrier

public abstract class AbstractEventProcessor
extends Object
implements EventProcessor, org.springframework.beans.factory.BeanNameAware

Basic services for the event processor implementations

Read 'good practice' notes for documenting behaviour.

Since:
1.0
Author:
Derek Hulley

Field Summary
protected static long DEFAULT_WARN_DELAY
           
protected  org.apache.commons.logging.Log logger
          Resource for derived classes to use for logging
 
Constructor Summary
AbstractEventProcessor()
          Default constructor
 
Method Summary
 long getWarnDelay()
          Provide a hint for the processing framework on how much time should elapse before the warnings need to be issued over the delay
 void register()
          Register this instance for the event names that are handled.
 void setBeanName(String beanName)
           
 void setEventName(String eventName)
          Set the single event name that this processor can handle
 void setEventNames(List<String> eventNames)
          Set the names of the events that this processor can handle
 void setRegistry(EventProcessorRegistry registry)
          Inject the registry that this instance will register with.
 void setWarnDelay(long warnDelay)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.alfresco.bm.event.EventProcessor
processEvent
 

Field Detail

DEFAULT_WARN_DELAY

protected static final long DEFAULT_WARN_DELAY
See Also:
Constant Field Values

logger

protected org.apache.commons.logging.Log logger
Resource for derived classes to use for logging

Constructor Detail

AbstractEventProcessor

public AbstractEventProcessor()
Default constructor

Method Detail

setBeanName

public void setBeanName(String beanName)
Specified by:
setBeanName in interface org.springframework.beans.factory.BeanNameAware

setEventName

public void setEventName(String eventName)
Set the single event name that this processor can handle


setEventNames

public void setEventNames(List<String> eventNames)
Set the names of the events that this processor can handle


setRegistry

public void setRegistry(EventProcessorRegistry registry)
Inject the registry that this instance will register with.


getWarnDelay

public long getWarnDelay()
Description copied from interface: EventProcessor
Provide a hint for the processing framework on how much time should elapse before the warnings need to be issued over the delay

Specified by:
getWarnDelay in interface EventProcessor
Returns:
the processing time after which an warning is logged (default DEFAULT_WARN_DELAY)

setWarnDelay

public void setWarnDelay(long warnDelay)
Parameters:
warnDelay - the time allowed for processing before a warning is logged
See Also:
getWarnDelay()

register

public void register()
Register this instance for the event names that are handled.



Copyright © 2012. All Rights Reserved.