org.alfresco.bm.event
Class RaiseEventsEventProcessor

java.lang.Object
  extended by org.alfresco.bm.event.AbstractEventProcessor
      extended by org.alfresco.bm.event.RaiseEventsEventProcessor
All Implemented Interfaces:
EventProcessor, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware

public class RaiseEventsEventProcessor
extends AbstractEventProcessor

Raises the prescribed number of event with the given event name.

Since:
1.0
Author:
Derek Hulley

Field Summary
 
Fields inherited from class org.alfresco.bm.event.AbstractEventProcessor
DEFAULT_WARN_DELAY, logger
 
Constructor Summary
RaiseEventsEventProcessor(String outputEventName, int outputEventCount)
          Constructor with essential values
 
Method Summary
 EventResult processEvent(Event event)
          Process an event.
 
Methods inherited from class org.alfresco.bm.event.AbstractEventProcessor
getWarnDelay, register, setBeanName, setEventName, setEventNames, setRegistry, setWarnDelay
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RaiseEventsEventProcessor

public RaiseEventsEventProcessor(String outputEventName,
                                 int outputEventCount)
Constructor with essential values

Parameters:
outputEventName - the event name to output
outputEventCount - the number of events to emit
Method Detail

processEvent

public EventResult processEvent(Event event)
                         throws Exception
Description copied from interface: EventProcessor
Process an event.

NOTE: All errors are treated as terminal i.e. there will be no follow-up events published. The event and result services are provided to allow event processing to be aware of previous and future work. If the service is used to modify queues, the results could be unexpected e.g. clearing the queue will not always mean that no more events will be processed.

Parameters:
event - the event (along with associated data)
Returns:
the result of the process (includes errors and next events)
Throws:
Exception


Copyright © 2012. All Rights Reserved.