Class ECA

  • All Implemented Interfaces:
    Comparable<ECA>

    public final class ECA
    extends Object
    implements Comparable<ECA>
    This class represents an Event-Condition-Action specification.
    • Constructor Detail

      • ECA

        public ECA​(EventType neweventType,
                   MetaClassID newtargetClass,
                   OperationID newfilterMethod,
                   OperationID newaction)
        Constructor
        Parameters:
        neweventType - Indicates event type
        newtargetClass - 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 occurs
        newaction - 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 type
        newfilterMethodSignatureInThisClass - Indicates the implementation that must be executed in the producer when that event occurs
        newactionSingatureInThisClass - 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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 interface Comparable<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