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

## Class EventSourceAdapter<EventAtom>

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

- All Implemented Interfaces:
    `EventSource<EventAtom>`
  Direct Known Subclasses:
    `ViatraQueryEventSource`

      public abstract class EventSourceAdapter<EventAtom>
      extends java.lang.Object
      implements EventSource<EventAtom>

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EventSourceAdapter​(EventSourceSpecification<EventAtom> specification, EventRealm realm)` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `addHandler​(EventHandler<EventAtom> handler)` |
    `protected void` | `afterHandlerAdded​(EventHandler<EventAtom> handler, boolean firstHandler)` |
    `protected void` | `afterHandlerRemoved​(EventHandler<EventAtom> handler, boolean handlersEmpty)` |
    `protected void` | `beforeHandlerAdded​(EventHandler<EventAtom> handler, boolean handlersEmpty)` |
    `protected void` | `beforeHandlerRemoved​(EventHandler<EventAtom> handler, boolean lastHandler)` |
    `void` | `dispose()` |
    `EventRealm` | `getRealm()` |
    `EventSourceSpecification<EventAtom>` | `getSourceSpecification()` |
    `void` | `notifyHandlers​(Event<EventAtom> event)` |
    `protected abstract void` | `prepareSource()` |
    `boolean` | `removeHandler​(EventHandler<EventAtom> handler)` |

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

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

- - ### Constructor Detail

    - #### EventSourceAdapter

          public EventSourceAdapter​(EventSourceSpecification<EventAtom> specification,
                                    EventRealm realm)

  - ### Method Detail

    - #### getSourceSpecification

          public EventSourceSpecification<EventAtom> getSourceSpecification()

      Specified by:
        `getSourceSpecification` in interface `EventSource<EventAtom>`

    - #### getRealm

          public EventRealm getRealm()

      Specified by:
        `getRealm` in interface `EventSource<EventAtom>`

    - #### addHandler

          public boolean addHandler​(EventHandler<EventAtom> handler)

    - #### removeHandler

          public boolean removeHandler​(EventHandler<EventAtom> handler)

    - #### notifyHandlers

          public void notifyHandlers​(Event<EventAtom> event)

    - #### beforeHandlerAdded

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

    - #### afterHandlerAdded

          protected void afterHandlerAdded​(EventHandler<EventAtom> handler,
                                           boolean firstHandler)

    - #### beforeHandlerRemoved

          protected void beforeHandlerRemoved​(EventHandler<EventAtom> handler,
                                              boolean lastHandler)

    - #### afterHandlerRemoved

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

    - #### prepareSource

          protected abstract void prepareSource()

    - #### dispose

          public void dispose()

      Specified by:
        `dispose` in interface `EventSource<EventAtom>`