Class Job<EventAtom>
- java.lang.Object
-
- org.eclipse.viatra.transformation.evm.api.Job<EventAtom>
-
- Direct Known Subclasses:
CommandExecutingJob
,CompositeJob
,StatelessJob
public abstract class Job<EventAtom> extends java.lang.Object
A job represents an action that can be executed on an activation if it is in the state defined by the job.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Job(ActivationState activationState)
Creates a new job corresponding to the given state.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
execute(Activation<? extends EventAtom> activation, Context context)
Executes the action on the activation using the supplied context.ActivationState
getActivationState()
protected abstract void
handleError(Activation<? extends EventAtom> activation, java.lang.Exception exception, Context context)
Called if theexecute(org.eclipse.viatra.transformation.evm.api.Activation<? extends EventAtom>, org.eclipse.viatra.transformation.evm.api.Context)
method has thrown an exception to allow jobs to handle their own errors.
-
-
-
Constructor Detail
-
Job
protected Job(ActivationState activationState)
Creates a new job corresponding to the given state.
-
-
Method Detail
-
getActivationState
public ActivationState getActivationState()
- Returns:
- the activationState
-
execute
protected abstract void execute(Activation<? extends EventAtom> activation, Context context)
Executes the action on the activation using the supplied context.- Parameters:
activation
-context
-
-
handleError
protected abstract void handleError(Activation<? extends EventAtom> activation, java.lang.Exception exception, Context context)
Called if theexecute(org.eclipse.viatra.transformation.evm.api.Activation<? extends EventAtom>, org.eclipse.viatra.transformation.evm.api.Context)
method has thrown an exception to allow jobs to handle their own errors.- Parameters:
activation
-exception
-context
-
-
-