Interface LocalExecutionMessageNotifier
-
- All Superinterfaces:
ADEPT2Service
,ExecutionMessageListener
public interface LocalExecutionMessageNotifier extends ExecutionMessageListener
This interface provides the means for anExecutionMessageListener
as simple service that forwards all incoming execution messages to the locally registeredExecutionMessageNotification
s. This avoids the need for anExecutionMessageNotification
to 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.void
unregisterExecutionMessageListener(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 oneExecutionMessageNotification
can be registered per execution session. If there is already a notification instance registered, no further notification instances can be registered. In this casenull
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
ornull
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.
-
-