org.eclipse.viatra.transformation.evm.specific.event

## Class ViatraQueryEventSource<Match extends IPatternMatch>

- java.lang.Object
- - org.eclipse.viatra.transformation.evm.api.event.adapter.EventSourceAdapter<Match>
  - - org.eclipse.viatra.transformation.evm.specific.event.ViatraQueryEventSource<Match>

- All Implemented Interfaces:
    EventSource<Match>

      public class ViatraQueryEventSource<Match extends IPatternMatch>
      extends EventSourceAdapter<Match>

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ViatraQueryEventSource(ViatraQueryEventRealm realm, ViatraQueryEventSourceSpecification<Match> sourceDefinition)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `afterHandlerRemoved(EventHandler<Match> handler, boolean handlersEmpty)`
    `protected void` | `beforeHandlerAdded(EventHandler<Match> handler, boolean handlersEmpty)`
    `void` | `dispose()`
    `IAttributeMonitorListener<Match>` | `getAttributeMonitorListener()`
    `ViatraQueryMatcher<Match>` | `getMatcher()`
    `protected IAttributeMonitorListener<Match>` | `prepareAttributeMonitorListener()` Initializes an attribute monitor listener
    `protected IMatchUpdateListener<Match>` | `prepareMatchUpdateListener()` Initializes the corresponding match update listener
    `protected void` | `prepareSource()`

    - ### Methods inherited from class org.eclipse.viatra.transformation.evm.api.event.adapter.EventSourceAdapter

      `addHandler, afterHandlerAdded, beforeHandlerRemoved, getRealm, getSourceSpecification, notifyHandlers, removeHandler`

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

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

- - ### Constructor Detail

    - #### ViatraQueryEventSource

          protected ViatraQueryEventSource(ViatraQueryEventRealm realm,
                                           ViatraQueryEventSourceSpecification<Match> sourceDefinition)

  - ### Method Detail

    - #### getMatcher

          public ViatraQueryMatcher<Match> getMatcher()

    - #### beforeHandlerAdded

          protected void beforeHandlerAdded(EventHandler<Match> handler,
                                            boolean handlersEmpty)

      Overrides:
        `beforeHandlerAdded` in class `EventSourceAdapter<Match extends IPatternMatch>`

    - #### afterHandlerRemoved

          protected void afterHandlerRemoved(EventHandler<Match> handler,
                                             boolean handlersEmpty)

      Overrides:
        `afterHandlerRemoved` in class `EventSourceAdapter<Match extends IPatternMatch>`

    - #### prepareSource

          protected void prepareSource()

      Specified by:
        `prepareSource` in class `EventSourceAdapter<Match extends IPatternMatch>`

    - #### prepareAttributeMonitorListener

          protected IAttributeMonitorListener<Match> prepareAttributeMonitorListener()

      Initializes an attribute monitor listener
      Returns:
        the prepared attribute monitor listener; must not be null

    - #### prepareMatchUpdateListener

          protected IMatchUpdateListener<Match> prepareMatchUpdateListener()

      Initializes the corresponding match update listener
      Returns:
        the prepared update listener; must not be null

    - #### dispose

          public void dispose()

      Specified by:
        `dispose` in interface `EventSource<Match extends IPatternMatch>`
      Overrides:
        `dispose` in class `EventSourceAdapter<Match extends IPatternMatch>`

    - #### getAttributeMonitorListener

          public IAttributeMonitorListener<Match> getAttributeMonitorListener()