Interface LocalExecutionMessageNotifier
-
- All Superinterfaces:
ADEPT2Service,ExecutionMessageListener
public interface LocalExecutionMessageNotifier extends ExecutionMessageListener
This interface provides the means for anExecutionMessageListeneras simple service that forwards all incoming execution messages to the locally registeredExecutionMessageNotifications. This avoids the need for anExecutionMessageNotificationto implementADEPT2Service.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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description URI[]registerExecutionMessageListener(SessionToken session, String sessionId, ExecutionMessageNotification listener)Registers the designated listener for messages of the designated execution session.voidunregisterExecutionMessageListener(SessionToken session, String sessionId, ExecutionMessageNotification listener)Unregisters the designated listener for messages state of the designated execution session.-
Methods inherited from interface de.aristaflow.adept2.base.service.ADEPT2Service
getLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, start
-
Methods inherited from interface de.aristaflow.adept2.core.runtimeservice.ExecutionMessageListener
getExecutionMessageNotification
-
-
-
-
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 oneExecutionMessageNotificationcan be registered per execution session. If there is already a notification instance registered, no further notification instances can be registered. In this casenullwill 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
RemoteActivityStartingornullin 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.
-
-