Interface ExecutionMessageNotification
-
public interface ExecutionMessageNotification
This interface simulates the notification of anExecutableComponent
when using a proprietarily executing client. Usually this is indicated by interrupting the thread and callingRuntimeEnvironment.dispatch()
. With a proprietarily executing client, the runtime service will use this method instead if there is a callback registered for it. Additionally, the client needs to reply synchronously, that is, it needs to indicate how the request will be handled.
If no callback is registered, the runtime service will only offer the requests and expect replies if appropriate.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONF_DISPATCH_CALLBACK_TIMEOUT
The configuration name for the time to wait indispatch(ExecutionMessage)
for a reply.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description de.aristaflow.adept2.model.runtimeenvironment.messages.execution.ReplyMessage<?>
dispatch(de.aristaflow.adept2.model.runtimeenvironment.messages.execution.ExecutionMessage message)
Deprecated.UsedispatchTimeout(ExecutionMessage)
instead.default SerialisablePair<de.aristaflow.adept2.model.runtimeenvironment.messages.execution.ReplyMessage<?>,Boolean>
dispatchTimeout(de.aristaflow.adept2.model.runtimeenvironment.messages.execution.ExecutionMessage message)
Notifies the designated message to a listener, that is the runtime manager has retrieved a signal for the corresponding execution session.void
executionTerminated(String sessionId)
Signals that the execution of the designated execution session has been terminated.
-
-
-
Field Detail
-
CONF_DISPATCH_CALLBACK_TIMEOUT
static final String CONF_DISPATCH_CALLBACK_TIMEOUT
The configuration name for the time to wait indispatch(ExecutionMessage)
for a reply.- See Also:
- Constant Field Values
-
-
Method Detail
-
dispatch
@Deprecated de.aristaflow.adept2.model.runtimeenvironment.messages.execution.ReplyMessage<?> dispatch(de.aristaflow.adept2.model.runtimeenvironment.messages.execution.ExecutionMessage message)
Deprecated.UsedispatchTimeout(ExecutionMessage)
instead.Notifies the designated message to a listener, that is the runtime manager has retrieved a signal for the corresponding execution session.
Implementations have to dispatch the (very same) message and return it with the reply set appropriately if a reply is required. If no reply is required,null
should be returned.
Replying positively to a state change request, for instance aCloseMessage
does not mean, the execution has terminated when the reply is sent but rather the execution will close shortly.- Parameters:
message
- The message providing the signal for the corresponding execution session.- Returns:
- The designated message having set the reply appropriately if a reply is required,
null
if no reply is required. This does not need to be the very same message instance that is provided but it needs to have the same session ID.
-
dispatchTimeout
default SerialisablePair<de.aristaflow.adept2.model.runtimeenvironment.messages.execution.ReplyMessage<?>,Boolean> dispatchTimeout(de.aristaflow.adept2.model.runtimeenvironment.messages.execution.ExecutionMessage message)
Notifies the designated message to a listener, that is the runtime manager has retrieved a signal for the corresponding execution session.
Implementations have to dispatch the (very same) message and return it with the reply set appropriately if a reply is required. If no reply is required,null
should be returned.
Replying positively to a state change request, for instance aCloseMessage
does not mean, the execution has terminated when the reply is sent but rather the execution will close shortly.- Parameters:
message
- The message providing the signal for the corresponding execution session.- Returns:
- The first element is the reply to the sent message or
null
. In case ofnull
check the second element:true
means the reply (evennull
) is valid and has been sent by the execution session,false
means there has not been a reply while waiting for it,null
means the execution session has already terminated. If the pair itself isnull
no reply is required.
-
executionTerminated
void executionTerminated(String sessionId)
Signals that the execution of the designated execution session has been terminated. That is, the listener will not be notified again.- Parameters:
sessionId
- The ID of the execution session this listener has been registered for.
-
-