org.alfresco.bm.event
Class EventResult

java.lang.Object
  extended by org.alfresco.bm.event.EventResult

public class EventResult
extends Object

The result of event processing. Instances can contain future events and additional data to for record purposes.

Since:
1.0
Author:
Derek Hulley

Constructor Summary
EventResult(List<Event> nextEvents)
          Constructor for successful results containing future events without any additional data to record.
EventResult(Serializable data, Event nextEvent)
          Constructor for successful results containing a future event with additional data to record.
EventResult(Serializable data, List<Event> nextEvents)
          Constructor for successful results containing future events with additional data to record.
EventResult(Serializable data, List<Event> nextEvents, boolean success)
          Constructor for results containing future events with additional data to record.
 
Method Summary
 Serializable getData()
           
 List<Event> getNextEvents()
           
 boolean isSuccess()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventResult

public EventResult(List<Event> nextEvents)
Constructor for successful results containing future events without any additional data to record.

Parameters:
nextEvents - any events that now follow on the processed event (may be empty)

EventResult

public EventResult(Serializable data,
                   List<Event> nextEvents)
Constructor for successful results containing future events with additional data to record.

Parameters:
data - additional data to record (e.g. a Throwable)
nextEvents - any events that now follow on the processed event (may be empty)

EventResult

public EventResult(Serializable data,
                   Event nextEvent)
Constructor for successful results containing a future event with additional data to record.

Parameters:
data - additional data to record (e.g. a Throwable)
nextEvent - the event that now follow on the processed event (never null)

EventResult

public EventResult(Serializable data,
                   List<Event> nextEvents,
                   boolean success)
Constructor for results containing future events with additional data to record.

Parameters:
data - additional data to record (e.g. a Throwable)
nextEvents - any events that now follow on the processed event (may be empty)
success - true if the result represents a successful operation
Method Detail

getData

public Serializable getData()
Returns:
Returns additional data to record or null

getNextEvents

public List<Event> getNextEvents()
Returns:
any events that now follow on the processed event (may be empty)

isSuccess

public boolean isSuccess()
Returns:
true if the event was successful otherwise false


Copyright © 2012. All Rights Reserved.