Class EventBehaviour

  • All Implemented Interfaces:
    Behaviour

    @AlfrescoPublicApi
    public class EventBehaviour
    extends BaseBehaviour
    Event based Behaviour.

    A client uses an EventBehaviour to bind a send event behaviour to a Class-level Policy.

    The event behavior delegates the generation of the event to a method pointer. The pointer is represented by an instance object and method name.

    Author:
    Cristian Turlica
    • Constructor Detail

      • EventBehaviour

        public EventBehaviour​(AbstractEventProducer eventProducer,
                              java.lang.String endpointUri,
                              java.lang.Object instance,
                              java.lang.String method)
        Construct.
        Parameters:
        instance - the object instance holding the method
        method - the method name
      • EventBehaviour

        public EventBehaviour​(AbstractEventProducer eventProducer,
                              java.lang.String endpointUri,
                              java.lang.Object instance,
                              java.lang.String method,
                              Behaviour.NotificationFrequency frequency)
        Construct.
        Parameters:
        instance - the object instance holding the method
        method - the method name
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getInterface

        public <T> T getInterface​(java.lang.Class<T> policy)
        Description copied from interface: Behaviour
        Gets the requested policy interface onto the behaviour
        Parameters:
        policy - the policy interface class
        Returns:
        the policy interface