Class JavaBehaviour

  • All Implemented Interfaces:
    Behaviour

    @AlfrescoPublicApi
    public class JavaBehaviour
    extends BaseBehaviour
    Java based Behaviour. A behavior acts like a delegate (a method pointer). The pointer is represented by an instance object and method name.
    Author:
    David Caruana
    • Constructor Detail

      • JavaBehaviour

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

        public JavaBehaviour​(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