public class AbstractEvent extends java.lang.Object implements Event
| Modifier and Type | Field and Description |
|---|---|
protected long |
creationTime
The time (in milliseconds, see
System.currentTimeMillis()) this
result set has been created. |
protected java.lang.String |
eventType
The type of this event.
|
protected long |
id
The ID of this event.
|
protected static ObjectCounting<de.aristaflow.adept2.core.eventmanager.common.EventTypeIndex> |
ID_COUNT
A counter for the IDs for all produced events based on the type of event.
|
protected java.net.URI[] |
managerURI
The URIs of the service (event manager) creating this event.
|
protected java.lang.String |
sourceID
The ID of the source of this event.
|
protected java.lang.String |
sourceType
The type of the source of this event.
|
| Constructor and Description |
|---|
AbstractEvent(java.net.URI[] managerURI,
java.lang.String eventType,
java.lang.String sourceType,
java.lang.String sourceID)
Creates a new event having the designated attributes.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getCreationTime()
Gets the time (in milliseconds) this event has been created.
|
java.net.URI[] |
getEventManager()
Gets the
URI of the event manager of the event source that
produced this event. |
java.lang.String |
getEventType()
Gets the type of this event.
|
long |
getID()
Gets the ID for this event that is set consecutively for all events of the
same type produced by the same event source.
|
java.lang.String |
getSourceID()
Gets the ID of the source of this event.
|
java.lang.String |
getSourceType()
Gets the type of the source of this event.
|
protected static final ObjectCounting<de.aristaflow.adept2.core.eventmanager.common.EventTypeIndex> ID_COUNT
protected final long id
protected final java.net.URI[] managerURI
protected final java.lang.String eventType
protected final java.lang.String sourceType
protected final java.lang.String sourceID
protected final long creationTime
System.currentTimeMillis()) this
result set has been created.public AbstractEvent(java.net.URI[] managerURI,
java.lang.String eventType,
java.lang.String sourceType,
java.lang.String sourceID)
managerURI - The URIs of the service (event manager) creating the
event.eventType - The type of the event.sourceType - The type of the source of this event.sourceID - The ID of the source of this event.public long getID()
Eventpublic java.net.URI[] getEventManager()
EventURI of the event manager of the event source that
produced this event.getEventManager in interface EventURI of the event manager of the event source that
produced this event.public java.lang.String getEventType()
EventgetEventType in interface Eventpublic java.lang.String getSourceType()
EventgetSourceType in interface Eventpublic java.lang.String getSourceID()
EventgetSourceID in interface Eventpublic long getCreationTime()
EventgetCreationTime in interface EventSystem.currentTimeMillis()