Interface LocalActivityStateNotifier

  • All Superinterfaces:
    ActivityStateListener, ADEPT2Service

    public interface LocalActivityStateNotifier
    extends ActivityStateListener
    This interface provides the means for an ActivityStateListener as simple service that forwards all incoming activity state notifications to the locally registered ActivityStateNotifcations. This avoids the need for an ActivityStateNotifcation to implement ADEPT2Service.

    The notification listeners can only be registered locally (no proxy objects allowed). They are identified via the registered EBP instance reference (as well as their object identity).
    The listeners will be unregistered implicitly, that is, as soon as an activity terminates (closes, resets, signals, or fails) the corresponding listeners will be unregistered. When resuming the listeners will be unregistered in case a different listener has been registered for future events. Otherwise (including a suspension) the listeners will remain.

    • Method Detail

      • registerActivityStateListener

        URI[] registerActivityStateListener​(SessionToken session,
                                            EBPInstanceReference activity,
                                            ActivityStateNotification listener)
        Registers the designated listener for state changes of the designated activity. The designated listener has to be local with respect to this listener service. This service will forward all notifications.
        Parameters:
        session - The session which is used to check for access rights on this method.
        activity - The activity for which to listen to state changes.
        listener - A listener to register for activity state changes.
        Returns:
        The URIs to register at SynchronousActivityStarting.
      • unregisterActivityStateListener

        void unregisterActivityStateListener​(SessionToken session,
                                             EBPInstanceReference activity,
                                             ActivityStateNotification listener)
        Unregisters the designated listener for state changes of the designated activity. The designated listener has to be local with respect to this listener service. Unregistering is not necessary after the activity has terminated (except it has suspended) since unregistering will be done implicitly.
        Parameters:
        session - The session which is used to check for access rights on this method.
        activity - The activity for which to no longer listen to state changes.
        listener - A listener to unregister for instance state changes.