org.eclipse.viatra.transformation.evm.api.event.adapter

## Class EventProcessorAdapter<EventAtom>

- java.lang.Object
- - org.eclipse.viatra.transformation.evm.api.event.adapter.EventProcessorAdapter<EventAtom>

-     public abstract class EventProcessorAdapter<EventAtom>
      extends java.lang.Object

  This class is the common supertype for default event processors in an event handler.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `EventProcessorAdapter(RuleInstance<EventAtom> instance)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract void` | `activationExists(Event<EventAtom> event, Activation<EventAtom> activation)` This method is called by findActivationForAtom if the activation already exists for the given atom.
    `protected abstract void` | `activationMissing(Event<EventAtom> event)` This method is called by findActivationForAtom if the activation does not exists for the given atom.
    `protected RuleInstance<EventAtom>` | `getInstance()`
    `void` | `processEvent(Event<EventAtom> event)` This method is called with the atom corresponding to the activation that is affected by the event.

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

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

- - ### Constructor Detail

    - #### EventProcessorAdapter

          protected EventProcessorAdapter(RuleInstance<EventAtom> instance)

  - ### Method Detail

    - #### processEvent

          public void processEvent(Event<EventAtom> event)

      This method is called with the atom corresponding to the activation that is affected by the event. If the Activation exists, `activationExists(Event, Activation)` is called with the Activation object, otherwise `activationMissing(Event)` with the atom object.
      Parameters:
        `event` -

    - #### activationExists

          protected abstract void activationExists(Event<EventAtom> event,
                                                   Activation<EventAtom> activation)

      This method is called by findActivationForAtom if the activation already exists for the given atom.
      Parameters:
        `activation` -

    - #### activationMissing

          protected abstract void activationMissing(Event<EventAtom> event)

      This method is called by findActivationForAtom if the activation does not exists for the given atom.
      Parameters:
        `atom` -

    - #### getInstance

          protected RuleInstance<EventAtom> getInstance()