org.eclipse.viatra.transformation.evm.specific.job

## Class StatelessJob<Match extends IPatternMatch>

- java.lang.Object
- - org.eclipse.viatra.transformation.evm.api.Job<Match>
  - - org.eclipse.viatra.transformation.evm.specific.job.StatelessJob<Match>

- Direct Known Subclasses:
    SequentialProcessorsJob

      public class StatelessJob<Match extends IPatternMatch>
      extends Job<Match>

  This class represents a `Job` that uses an `Consumer` on the match of the activation when executed.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StatelessJob(CRUDActivationStateEnum activationStateEnum, java.util.function.Consumer<Match> matchProcessor)` Creates a stateless job for the given state and processor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `execute(Activation<? extends Match> activation, Context context)` Executes the action on the activation using the supplied context.
    `java.util.function.Consumer<Match>` | `getMatchProcessor()`
    `protected void` | `handleError(Activation<? extends Match> activation, java.lang.Exception exception, Context context)` Called if the `Job.execute(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.

    - ### Methods inherited from class org.eclipse.viatra.transformation.evm.api.Job

      `getActivationState`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StatelessJob

          public StatelessJob(CRUDActivationStateEnum activationStateEnum,
                              java.util.function.Consumer<Match> matchProcessor)

      Creates a stateless job for the given state and processor.
      Since:
        2.0

  - ### Method Detail

    - #### getMatchProcessor

          public java.util.function.Consumer<Match> getMatchProcessor()

      Returns:
        the matchProcessor executed by the job
      Since:
        2.0

    - #### execute

          protected void execute(Activation<? extends Match> activation,
                                 Context context)

      Description copied from class: `Job`
      Executes the action on the activation using the supplied context.
      Specified by:
        `execute` in class `Job<Match extends IPatternMatch>`

    - #### handleError

          protected void handleError(Activation<? extends Match> activation,
                                     java.lang.Exception exception,
                                     Context context)

      Description copied from class: `Job`
      Called if the `Job.execute(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.
      Specified by:
        `handleError` in class `Job<Match extends IPatternMatch>`