Class ECA
- java.lang.Object
-
- es.bsc.dataclay.util.events.listeners.ECA
-
- All Implemented Interfaces:
Comparable<ECA>
public final class ECA extends Object implements Comparable<ECA>
This class represents an Event-Condition-Action specification.
-
-
Constructor Summary
Constructors Constructor Description ECA()
Used for deserializationECA(EventType neweventType, MetaClassID newtargetClass, OperationID newfilterMethod, OperationID newaction)
ConstructorECA(EventType neweventType, String newfilterMethodSignatureInThisClass, String newactionSingatureInThisClass)
Constructor for ECAs defined in classes
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkIsEventType(EventMessage message)
Checks if message accomplishes event typeint
compareTo(ECA other)
The natural ordering for a class C is said to be consistent with equals if and only if e1.compareTo(e2) == 0 has the same boolean value as e1.equals(e2) for every e1 and e2 of class C.boolean
equals(Object obj)
OperationID
getAction()
Get the EventListener::actionString
getActionSignature()
EventType
getEventType()
Get event typeOperationID
getFilterMethod()
Get the EventListener::filterMethodString
getFilterMethodSignature()
ECAID
getId()
Get the EventListenerImpl::idMetaClassID
getTargetClass()
Returns the ID of target classint
hashCode()
void
setAction(OperationID newaction)
Set the EventListener::actionvoid
setActionSignature(String newactionSignature)
void
setEventType(EventType newEventType)
Set event typevoid
setFilterMethod(OperationID newfilterMethod)
Set the EventListener::filterMethodvoid
setFilterMethodSignature(String newfilterMethodSignature)
void
setId(ECAID newid)
Set the EventListenerImpl::idvoid
setTargetClass(MetaClassID newTargetClass)
Sets the ID of target classString
toString()
-
-
-
Constructor Detail
-
ECA
public ECA(EventType neweventType, MetaClassID newtargetClass, OperationID newfilterMethod, OperationID newaction)
Constructor- Parameters:
neweventType
- Indicates event typenewtargetClass
- Indicates class of objects that are going to be target of the action.newfilterMethod
- Indicates the implementation that must be executed in the producer when that event occursnewaction
- Indicates the implementation that must be executed when that event occurs
-
ECA
public ECA(EventType neweventType, String newfilterMethodSignatureInThisClass, String newactionSingatureInThisClass)
Constructor for ECAs defined in classes- Parameters:
neweventType
- Indicates event typenewfilterMethodSignatureInThisClass
- Indicates the implementation that must be executed in the producer when that event occursnewactionSingatureInThisClass
- Indicates the implementation that must be executed when that event occurs
-
ECA
public ECA()
Used for deserialization
-
-
Method Detail
-
getEventType
public EventType getEventType()
Get event type- Returns:
- Event Type
-
setEventType
public void setEventType(EventType newEventType)
Set event type- Parameters:
newEventType
- Event type
-
getAction
public OperationID getAction()
Get the EventListener::action- Returns:
- the action
-
setAction
public void setAction(OperationID newaction)
Set the EventListener::action- Parameters:
newaction
- the action to set
-
getFilterMethod
public OperationID getFilterMethod()
Get the EventListener::filterMethod- Returns:
- the filterMethod
-
setFilterMethod
public void setFilterMethod(OperationID newfilterMethod)
Set the EventListener::filterMethod- Parameters:
newfilterMethod
- the filterMethod to set
-
getId
public ECAID getId()
Get the EventListenerImpl::id- Returns:
- the id
-
setId
public void setId(ECAID newid)
Set the EventListenerImpl::id- Parameters:
newid
- the id to set
-
checkIsEventType
public boolean checkIsEventType(EventMessage message)
Checks if message accomplishes event type- Parameters:
message
- Message to check.- Returns:
- TRUE if message accomplishes event type
-
compareTo
public int compareTo(ECA other)
The natural ordering for a class C is said to be consistent with equals if and only if e1.compareTo(e2) == 0 has the same boolean value as e1.equals(e2) for every e1 and e2 of class C. Note that null is not an instance of any class, and e.compareTo(null) should throw a NullPointerException even though e.equals(null) returns false.- Specified by:
compareTo
in interfaceComparable<ECA>
-
getTargetClass
public MetaClassID getTargetClass()
Returns the ID of target class- Returns:
- the id of target class
-
setTargetClass
public void setTargetClass(MetaClassID newTargetClass)
Sets the ID of target class- Parameters:
newTargetClass
- new ID for targetClass
-
getFilterMethodSignature
public String getFilterMethodSignature()
- Returns:
- the filterMethodSignature
-
setFilterMethodSignature
public void setFilterMethodSignature(String newfilterMethodSignature)
- Parameters:
newfilterMethodSignature
- the filterMethodSignature to set
-
getActionSignature
public String getActionSignature()
- Returns:
- the actionSignature
-
setActionSignature
public void setActionSignature(String newactionSignature)
- Parameters:
newactionSignature
- the actionSignature to set
-
-