public abstract class AdapterLifecycleEvent extends Event implements java.io.Serializable
Contains behaviour common to all Events
in the framework
which relate to an Adapter
's lifecycle.
In the adapter configuration file this class is aliased as adapter-lifecycle-event which is the preferred alternative to the fully qualified classname when building your configuration.
Modifier | Constructor and Description |
---|---|
protected |
AdapterLifecycleEvent(java.lang.String s)
Creates a new instance with passed name space.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAdapterUniqueId()
Returns the unique ID of the adapter emitting this event.
|
java.lang.String |
getNameSpace()
Returns the name space of this
Event . |
boolean |
getWasSuccessful()
Returns true if the adapter life cycle event occurred successfully,
otherwise false.
|
void |
setAdapterUniqueId(java.lang.String string)
Sets the unique ID of the adapter emitting this event.
|
void |
setWasSuccessful(boolean b)
Sets the success or otherwise of the adapter life cycle event.
|
createNameSpace, getCreationTime, getDestinationId, getSourceId, getUniqueId, setCreationTime, setDestinationId, setSourceId, setUniqueId
protected AdapterLifecycleEvent(java.lang.String s)
Creates a new instance with passed name space. Used by concrete sub classes. Success defaults to true.
s
- the name space of this Event
, may not be null or
emptypublic java.lang.String getNameSpace()
Returns the name space of this Event
. Over-rides
implementation in Event
and adds .fail
or
.success
to the end of the original name space, based on
calling getWasSuccessful
.
getNameSpace
in class Event
Event
public java.lang.String getAdapterUniqueId()
Returns the unique ID of the adapter emitting this event.
public void setAdapterUniqueId(java.lang.String string)
Sets the unique ID of the adapter emitting this event.
string
- the unique ID of the adapter emitting this eventpublic boolean getWasSuccessful()
Returns true if the adapter life cycle event occurred successfully, otherwise false.
public void setWasSuccessful(boolean b)
Sets the success or otherwise of the adapter life cycle event.
b
- the success or otherwise of the adapter life cycle event