Package alpine.event.framework
Interface ChainableEvent
-
- All Superinterfaces:
Event
- All Known Implementing Classes:
AbstractChainableEvent,SingletonCapableEvent
public interface ChainableEvent extends Event
The ChainableEvent interface defines methods necessary to support an unbounded chain of callbacks and event between differentIEventServiceimplementations.- Since:
- 1.2.0
- Author:
- Steve Springett
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UUIDgetChainIdentifier()Returns the unique identifier for the chain this event is a part of.UUIDgetEventIdentifier()Returns the unique identifier for this event.ChainLink[]onFailure()Returns the optional callback event that should be processed if this event is not successful.ChainableEventonFailure(Event onFailureEvent)Fluent method that sets the onFailure Event and returns this object.ChainableEventonFailure(Event onFailureEvent, Class<? extends IEventService> onFailureEventService)Fluent method that sets the onFailure Event and returns this object.ChainLink[]onSuccess()Returns the optional callback event that should be processed if this event is successful.ChainableEventonSuccess(Event onSuccessEvent)Fluent method that sets the onSuccess Event and returns this object.ChainableEventonSuccess(Event onSuccessEvent, Class<? extends IEventService> onSuccessEventService)Fluent method that sets the onSuccess Event and returns this object.voidsetChainIdentifier(UUID chainIdentifier)Sets the unique identifier for the chain this event is a part of.
-
-
-
Method Detail
-
getEventIdentifier
UUID getEventIdentifier()
Returns the unique identifier for this event.- Returns:
- the unique identifier for this event
- Since:
- 1.4.0
-
getChainIdentifier
UUID getChainIdentifier()
Returns the unique identifier for the chain this event is a part of.- Returns:
- the unique identifier for the chain this event is a part of
- Since:
- 1.4.0
-
setChainIdentifier
void setChainIdentifier(UUID chainIdentifier)
Sets the unique identifier for the chain this event is a part of.- Parameters:
chainIdentifier- the UUID of the chain- Since:
- 1.4.0
-
onSuccess
ChainLink[] onSuccess()
Returns the optional callback event that should be processed if this event is successful.- Returns:
- an Event
- Since:
- 1.2.0
-
onFailure
ChainLink[] onFailure()
Returns the optional callback event that should be processed if this event is not successful.- Returns:
- an Event
- Since:
- 1.2.0
-
onSuccess
ChainableEvent onSuccess(Event onSuccessEvent)
Fluent method that sets the onSuccess Event and returns this object.- Parameters:
onSuccessEvent- the event to publish if this event succeeds- Returns:
- the current object
- Since:
- 1.2.0
-
onSuccess
ChainableEvent onSuccess(Event onSuccessEvent, Class<? extends IEventService> onSuccessEventService)
Fluent method that sets the onSuccess Event and returns this object.- Parameters:
onSuccessEvent- the event to publish if this event succeedsonSuccessEventService- the specific IEventService implementation to use- Returns:
- the current object
- Since:
- 1.2.0
-
onFailure
ChainableEvent onFailure(Event onFailureEvent)
Fluent method that sets the onFailure Event and returns this object.- Parameters:
onFailureEvent- the event to publish if this event fails- Returns:
- the current object
- Since:
- 1.2.0
-
onFailure
ChainableEvent onFailure(Event onFailureEvent, Class<? extends IEventService> onFailureEventService)
Fluent method that sets the onFailure Event and returns this object.- Parameters:
onFailureEvent- the event to publish if this event failsonFailureEventService- the specific IEventService implementation to use- Returns:
- the current object
- Since:
- 1.2.0
-
-