Interface LocalExecutionMessageNotifier

  • All Superinterfaces:
    ADEPT2Service, ExecutionMessageListener

    public interface LocalExecutionMessageNotifier
    extends ExecutionMessageListener
    This interface provides the means for an ExecutionMessageListener as simple service that forwards all incoming execution messages to the locally registered ExecutionMessageNotifications. This avoids the need for an ExecutionMessageNotification to implement ADEPT2Service.

    The notification listeners can only be registered locally (no proxy objects allowed). They are identified via the registered execution session ID (as well as their object identity).
    The registered listeners will be automatically removed as soon as the corresponding execution has terminated.

    • Method Detail

      • registerExecutionMessageListener

        URI[] registerExecutionMessageListener​(SessionToken session,
                                               String sessionId,
                                               ExecutionMessageNotification listener)
        Registers the designated listener for messages of the designated execution session. The designated listener has to be local with respect to this listener service. This service will forward all notifications.
        Execution messages have a return value and thus only one ExecutionMessageNotification can be registered per execution session. If there is already a notification instance registered, no further notification instances can be registered. In this case null will be returned.
        Parameters:
        session - The session which is used to check for access rights on this method.
        sessionId - The ID of the execution session which to listen to messages.
        listener - A listener to register for execution messages.
        Returns:
        The URIs to register at RemoteActivityStarting or null in case there is already a listener registered for the designated session ID.
      • unregisterExecutionMessageListener

        void unregisterExecutionMessageListener​(SessionToken session,
                                                String sessionId,
                                                ExecutionMessageNotification listener)
        Unregisters the designated listener for messages state of the designated execution session. The designated listener has to be local with respect to this listener service. Unregistering is not necessary after the corresponding execution has terminated.
        Parameters:
        session - The session which is used to check for access rights on this method.
        sessionId - The ID of the execution session for which to no longer to listen to messages.
        listener - A listener to unregister for execution messages.