Package es.bsc.dataclay.util.events.type
Class EventType
- java.lang.Object
-
- es.bsc.dataclay.util.events.type.EventType
-
- Direct Known Subclasses:
DeletedObjEventType
,PersistedObjEventType
,UpdatedObjEventType
public abstract class EventType extends Object
This class represents an event type.
-
-
Field Summary
Fields Modifier and Type Field Description EventTypeOuter.EventTypeEnum
eventTypeEnum
Event Type enum.
-
Constructor Summary
Constructors Modifier Constructor Description protected
EventType()
Constructor used for deserialization.protected
EventType(EventTypeOuter.EventTypeEnum neweventTypeEnum)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
checkIsEventType(EventMessage message)
Checks if event received belongs to this event type.EventTypeOuter.EventTypeEnum
getEventTypeEnum()
int
getPriority()
Get priority of the Event Typeabstract void
init(AccountID accountID, PasswordCredential credential, String namespace, LogicModuleAPI lm)
Initialize (if needed) IDs from specifications (example: className -> class ID)void
setEventTypeEnum(EventTypeOuter.EventTypeEnum theEventTypeEnum)
-
-
-
Field Detail
-
eventTypeEnum
public EventTypeOuter.EventTypeEnum eventTypeEnum
Event Type enum. Used for priorities.
-
-
Constructor Detail
-
EventType
protected EventType()
Constructor used for deserialization.
-
EventType
protected EventType(EventTypeOuter.EventTypeEnum neweventTypeEnum)
Constructor- Parameters:
neweventTypeEnum
- Event type enum
-
-
Method Detail
-
init
public abstract void init(AccountID accountID, PasswordCredential credential, String namespace, LogicModuleAPI lm)
Initialize (if needed) IDs from specifications (example: className -> class ID)- Parameters:
accountID
- ID of account registering the Event Typecredential
- Credentials of account registering the Event Typenamespace
- Namespace being used to register events. Used for registration of classes and ECAs at once.lm
- Reference to LogicModule to seek for IDs and so on.
-
checkIsEventType
public abstract boolean checkIsEventType(EventMessage message)
Checks if event received belongs to this event type.- Parameters:
message
- Event message- Returns:
- TRUE if message belongs to this event type. FALSE otherwise.
-
getPriority
public final int getPriority()
Get priority of the Event Type- Returns:
- Priority of the event. Used by Notification Manager for instance: store notifications before delete.
-
getEventTypeEnum
public final EventTypeOuter.EventTypeEnum getEventTypeEnum()
- Returns:
- the eventTypeEnum
-
setEventTypeEnum
public final void setEventTypeEnum(EventTypeOuter.EventTypeEnum theEventTypeEnum)
- Parameters:
theEventTypeEnum
- the eventTypeEnum to set
-
-