Class AbstractEvent
- java.lang.Object
- 
- de.aristaflow.adept2.core.eventmanager.common.AbstractEvent
 
- 
- All Implemented Interfaces:
- Event
 - Direct Known Subclasses:
- FileEventImpl,- MailEventImpl,- MemoryResultSetEventImpl,- ResultSetEventImpl
 
 public class AbstractEvent extends Object implements Event An abstract event providing the type handling and ID handling as well as the creation date. Additionally this class creates unique IDs for each created event based on the type. That is the ID is unique with respect to the event type, source type, source ID and event manager.- Author:
- Ulrich Kreher
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected longcreationTimeThe time (in milliseconds, seeSystem.currentTimeMillis()) this result set has been created.protected StringeventTypeThe type of this event.protected longidThe ID of this event.protected static ObjectCounting<de.aristaflow.adept2.core.eventmanager.common.EventTypeIndex>ID_COUNTA counter for the IDs for all produced events based on the type of event.protected URI[]managerURIThe URIs of the service (event manager) creating this event.protected StringsourceIDThe ID of the source of this event.protected StringsourceTypeThe type of the source of this event.
 - 
Constructor SummaryConstructors Constructor Description AbstractEvent(URI[] managerURI, String eventType, String sourceType, String sourceID)Creates a new event having the designated attributes.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCreationTime()Gets the time (in milliseconds) this event has been created.URI[]getEventManager()Gets theURIof the event manager of the event source that produced this event.StringgetEventType()Gets the type of this event.longgetID()Gets the ID for this event that is set consecutively for all events of the same type produced by the same event source.StringgetSourceID()Gets the ID of the source of this event.StringgetSourceType()Gets the type of the source of this event.
 
- 
- 
- 
Field Detail- 
ID_COUNTprotected static final 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.
 - 
idprotected final long id The ID of this event.
 - 
managerURIprotected final URI[] managerURI The URIs of the service (event manager) creating this event.
 - 
eventTypeprotected final String eventType The type of this event.
 - 
sourceTypeprotected final String sourceType The type of the source of this event.
 - 
sourceIDprotected final String sourceID The ID of the source of this event.
 - 
creationTimeprotected final long creationTime The time (in milliseconds, seeSystem.currentTimeMillis()) this result set has been created.
 
- 
 - 
Constructor Detail- 
AbstractEventpublic AbstractEvent(URI[] managerURI, String eventType, String sourceType, String sourceID) Creates a new event having the designated attributes.- Parameters:
- 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.
 
 
- 
 - 
Method Detail- 
getIDpublic long getID() Description copied from interface:EventGets the ID for this event that is set consecutively for all events of the same type produced by the same event source.
 - 
getEventManagerpublic URI[] getEventManager() Description copied from interface:EventGets theURIof the event manager of the event source that produced this event.- Specified by:
- getEventManagerin interface- Event
- Returns:
- The URIof the event manager of the event source that produced this event.
 
 - 
getEventTypepublic String getEventType() Description copied from interface:EventGets the type of this event.- Specified by:
- getEventTypein interface- Event
- Returns:
- The type of this event.
 
 - 
getSourceTypepublic String getSourceType() Description copied from interface:EventGets the type of the source of this event.- Specified by:
- getSourceTypein interface- Event
- Returns:
- The type of the source of of this event.
 
 - 
getSourceIDpublic String getSourceID() Description copied from interface:EventGets the ID of the source of this event.- Specified by:
- getSourceIDin interface- Event
- Returns:
- The ID of the source of of this event.
 
 - 
getCreationTimepublic long getCreationTime() Description copied from interface:EventGets the time (in milliseconds) this event has been created.- Specified by:
- getCreationTimein interface- Event
- Returns:
- The time (in milliseconds) this event has been created.
- See Also:
- System.currentTimeMillis()
 
 
- 
 
-