Interface LocalInstanceStateNotifier

  • All Superinterfaces:
    ADEPT2Service, InstanceStateListener

    public interface LocalInstanceStateNotifier
    extends InstanceStateListener
    This interface provides the means for an InstanceStateListener as simple service that forwards all incoming instance state notifications to the locally registered InstanceStateNotifcations. This avoids the need for an InstanceStateNotifcation to implement ADEPT2Service.

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

    • Method Detail

      • registerInstanceStateListener

        URI[] registerInstanceStateListener​(SessionToken session,
                                            UUID instanceId,
                                            InstanceStateNotification listener)
        Registers the designated listener for state changes of the designated instance. 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.
        instanceId - The ID of the instance for which to listen to state changes.
        listener - A listener to register for instance state changes.
        Returns:
        The URIs to register at InstanceControl.
      • unregisterInstanceStateListener

        void unregisterInstanceStateListener​(SessionToken session,
                                             UUID instanceId,
                                             InstanceStateNotification listener)
        Unregisters the designated listener for state changes of the designated instance. The designated listener has to be local with respect to this listener service. Unregistering is not necessary after the instance has finished or failed since unregistering will be done implicitly in these cases.
        Parameters:
        session - The session which is used to check for access rights on this method.
        instanceId - The ID of the instance for which to no longer listen to state changes.
        listener - A listener to unregister for instance state changes.
      • registerInstanceStateListener

        URI[] registerInstanceStateListener​(SessionToken session,
                                            InstanceStateNotification listener)
        Registers the designated listener for state changes of every instance. The designated listener has to be local with respect to this listener service. This service will forward all notifications. Unregistering is required.
        Parameters:
        session - The session which is used to check for access rights on this method.
        listener - A listener to register for instance state changes.
        Returns:
        The URIs to register at InstanceControl.
      • unregisterInstanceStateListener

        void unregisterInstanceStateListener​(SessionToken session,
                                             InstanceStateNotification listener)
        Unregisters the designated listener for state changes of every instance. The designated listener has to be local with respect to this listener service. Unregistering is required.
        Parameters:
        session - The session which is used to check for access rights on this method.
        listener - A listener to unregister for instance state changes.