Interface LocalActivityStateNotifier
-
- All Superinterfaces:
ActivityStateListener
,ADEPT2Service
public interface LocalActivityStateNotifier extends ActivityStateListener
This interface provides the means for anActivityStateListener
as simple service that forwards all incoming activity state notifications to the locally registeredActivityStateNotifcation
s. This avoids the need for anActivityStateNotifcation
to implementADEPT2Service
.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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description URI[]
registerActivityStateListener(SessionToken session, EBPInstanceReference activity, ActivityStateNotification listener)
Registers the designated listener for state changes of the designated activity.void
unregisterActivityStateListener(SessionToken session, EBPInstanceReference activity, ActivityStateNotification listener)
Unregisters the designated listener for state changes of the designated activity.-
Methods inherited from interface de.aristaflow.adept2.core.runtimemanager.ActivityStateListener
getActivityStateNotification
-
Methods inherited from interface de.aristaflow.adept2.base.service.ADEPT2Service
getLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, start
-
-
-
-
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.
-
-