public abstract class Event
extends java.lang.Object
Contains behaviour common to all Event
s in the framework.
Note on unique ids: initially UID was generated for each new Event instance and immutable. I.e. a 'system' level UID. This meant that if an Event was marshalled then unmarshalled it would have a different UID. This has been changed to an 'application' level UID, which doesn't change during marshalling / unmarshalling.
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
log |
Modifier | Constructor and Description |
---|---|
protected |
Event() |
protected |
Event(java.lang.String s)
Creates a new instance with passed name space.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createNameSpace()
Creates the hierarchical name space for this event.
|
long |
getCreationTime()
Returns the creation time of this
Event . |
java.lang.String |
getDestinationId()
Returns the unique ID of the destination
Adapter (or other
entity such as a GUI). |
java.lang.String |
getNameSpace()
Returns the immutable name space of this
Event . |
java.lang.String |
getSourceId()
Returns the unique ID of the source
Adapter (or other
entity such as a GUI). |
java.lang.String |
getUniqueId()
Returns the
Event 's unique ID. |
void |
setCreationTime(long l)
Sets the creation time of this
Event . |
void |
setDestinationId(java.lang.String s)
Sets the unique ID of the destination
Adapter (or other
entity such as a GUI). |
void |
setSourceId(java.lang.String s)
Sets the unique ID of the source
Adapter (or other
entity such as a GUI). |
void |
setUniqueId(java.lang.String s)
Sets the
Event 's unique ID. |
protected Event()
protected Event(java.lang.String s)
Creates a new instance with passed name space.
s
- the name space of this Event
, may not be null or
emptypublic java.lang.String createNameSpace()
The namespace is made up of the configured (or default namespace for the event, plus the source adapter unique id, plus the destination adapter id. These elements are separated by '.', the configured name space may contain '.' delimiters as required and destination id may be null.
Event
's name spacepublic void setUniqueId(java.lang.String s)
Sets the Event
's unique ID.
s
- the Event
's unique ID, may not be null or emptypublic java.lang.String getUniqueId()
Returns the Event
's unique ID.
Event
's unique IDpublic void setDestinationId(java.lang.String s)
Sets the unique ID of the destination Adapter
(or other
entity such as a GUI). This is optional.
s
- the unique ID of the destination Adapter
public java.lang.String getDestinationId()
Returns the unique ID of the destination Adapter
(or other
entity such as a GUI).
Adapter
public void setSourceId(java.lang.String s)
Sets the unique ID of the source Adapter
(or other
entity such as a GUI).
s
- the unique ID of the source Adapter
public java.lang.String getSourceId()
Returns the unique ID of the source Adapter
(or other
entity such as a GUI).
Adapter
public void setCreationTime(long l)
Sets the creation time of this Event
.
l
- the creation time of this Event
public long getCreationTime()
Returns the creation time of this Event
.
Event
public java.lang.String getNameSpace()
Returns the immutable name space of this Event
.
Event