public interface JobExecutionContext
The JobExecutionContext
is the abstraction layer which bundles all actions that the
server can trigger on the client side part of a Job
and the communication layer which
transports these actions.
This is primarily JMS but other technologies could implement this interface as well.
Modifier and Type | Method and Description |
---|---|
void |
announceSubPipelineCreation(Node parent,
Set<? extends Node> createdNodes)
Notify the client that a
SubPipeline has been created on the server side |
Job |
getClientJob() |
ServerJob |
getServerJob() |
void |
init(ServerJob serverJob)
|
void |
notifyJobLaunchFailed(com.levigo.util.log.qualified.MessageID message,
Throwable th)
Notify the client that an error occurred while launching this job
|
void |
sendLogMessage(NodeWorker<?> worker,
com.levigo.util.log.qualified.QualifiedLogEvent event)
Send a log message to the client.
|
void |
sendLogMessage(NodeWorker<?> worker,
com.levigo.util.log.qualified.QualifiedLogEvent event,
com.levigo.util.log.Level level)
Send a log message to the client with a specific log
Level |
void |
sendStateUpdate(Job.State state)
|
void |
shutdown()
Shuts down this context and close the connection to the client.
|
ServerJob getServerJob() throws IllegalStateException
ServerJob
which is being executed in this context.IllegalStateException
- if this method is called before init.void init(ServerJob serverJob) throws JobException
serverJob
- The ServerJob
that will perform the workJobException
- if an error occurred while initializing this context.void notifyJobLaunchFailed(com.levigo.util.log.qualified.MessageID message, Throwable th)
message
- The MessageID
of the error that prevents the successful job launchingth
- (optional) The Exception that has occurredvoid sendStateUpdate(Job.State state)
state
- the new stateJob.getState()
void sendLogMessage(NodeWorker<?> worker, com.levigo.util.log.qualified.QualifiedLogEvent event)
worker
- The NodeWorker
that caused that eventevent
- The event itselfvoid sendLogMessage(NodeWorker<?> worker, com.levigo.util.log.qualified.QualifiedLogEvent event, com.levigo.util.log.Level level)
Level
worker
- The NodeWorker
that caused that eventevent
- The event itselflevel
- The Level
of that eventvoid announceSubPipelineCreation(Node parent, Set<? extends Node> createdNodes)
SubPipeline
has been created on the server sidevoid shutdown()
Copyright © 2017 levigo holding gmbh. All rights reserved.