Package ghidra.trace.util

# Class TypedEventDispatcher

java.lang.Object
ghidra.trace.util.TypedEventDispatcher

Direct Known Subclasses:
  `DBTraceProgramView.EventTranslator`, `TraceDomainObjectListener`

public class TypedEventDispatcher extends Object

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `TypedEventDispatcher.AffectedAndValuesOnlyHandler<T,U>`
  `static interface`
  `TypedEventDispatcher.AffectedObjectHandler<T>`
  `static interface`
  `TypedEventDispatcher.AffectedObjectOnlyHandler<T>`
  `static interface`
  `TypedEventDispatcher.EventRecordHandler<T,U>`
  `static interface`
  `TypedEventDispatcher.FullEventRecordHandler<T,U>`
  `static interface`
  `TypedEventDispatcher.IgnoreAllHandler`
  `static interface`
  `TypedEventDispatcher.IgnoreValuesHandler`
  `static interface`
  `TypedEventDispatcher.SpaceValuesHandler<U>`
  `static interface`
  `TypedEventDispatcher.ValuesOnlyHandler<U>`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Consumer<DomainObjectChangeRecord>`
  `restoredHandler`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TypedEventDispatcher()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `handleChangeRecord(DomainObjectChangeRecord rec)`
  `void`
  `handleTraceChangeRecord(TraceChangeRecord<?,?> rec)`
  `protected void`
  `listenFor(TraceEvent<?,?> type, TypedEventDispatcher.IgnoreAllHandler handler)`
  `protected void`
  `listenFor(TraceEvent<?,?> type, TypedEventDispatcher.IgnoreValuesHandler handler)`
  `protected <T, U> void`
  `listenFor(TraceEvent<T,U> type, TypedEventDispatcher.AffectedAndValuesOnlyHandler<? super T,? super U> handler)`
  Listen for the given event, taking the affected object, the old value, and the new value
  `protected <T, U> void`
  `listenFor(TraceEvent<T,U> type, TypedEventDispatcher.AffectedObjectHandler<? super T> handler)`
  `protected <T, U> void`
  `listenFor(TraceEvent<T,U> type, TypedEventDispatcher.AffectedObjectOnlyHandler<? super T> handler)`
  `protected <T, U> void`
  `listenFor(TraceEvent<T,U> type, TypedEventDispatcher.EventRecordHandler<T,U> handler)`
  `protected <T, U> void`
  `listenFor(TraceEvent<T,U> type, TypedEventDispatcher.FullEventRecordHandler<? super T,? super U> handler)`
  `protected <T, U> void`
  `listenFor(TraceEvent<T,U> type, TypedEventDispatcher.SpaceValuesHandler<? super U> handler)`
  `protected <T, U> void`
  `listenFor(TraceEvent<T,U> type, TypedEventDispatcher.ValuesOnlyHandler<? super U> handler)`
  `protected void`
  `listenForUntyped(EventType type, Consumer<DomainObjectChangeRecord> handler)`
  `protected void`
  `unhandled(DomainObjectChangeRecord rec)`

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

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

- ## Field Details

  - ### restoredHandler

    protected Consumer<DomainObjectChangeRecord> restoredHandler

- ## Constructor Details

  - ### TypedEventDispatcher

    public TypedEventDispatcher()

- ## Method Details

  - ### listenFor

    protected <T, U> void listenFor(TraceEvent<T,U> type, TypedEventDispatcher.EventRecordHandler<T,U> handler)

  - ### listenFor

    protected <T, U> void listenFor(TraceEvent<T,U> type, TypedEventDispatcher.FullEventRecordHandler<? super T,? super U> handler)

  - ### listenFor

    protected <T, U> void listenFor(TraceEvent<T,U> type, TypedEventDispatcher.AffectedObjectHandler<? super T> handler)

  - ### listenFor

    protected <T, U> void listenFor(TraceEvent<T,U> type, TypedEventDispatcher.AffectedObjectOnlyHandler<? super T> handler)

  - ### listenFor

    protected <T, U> void listenFor(TraceEvent<T,U> type, TypedEventDispatcher.AffectedAndValuesOnlyHandler<? super T,? super U> handler)
    Listen for the given event, taking the affected object, the old value, and the new value
    Type Parameters:
      `T` - the type of the affected object
      `U` - the type of the values
    Parameters:
      `type` - the event type
      `handler` - the handler

  - ### listenFor

    protected <T, U> void listenFor(TraceEvent<T,U> type, TypedEventDispatcher.ValuesOnlyHandler<? super U> handler)

  - ### listenFor

    protected <T, U> void listenFor(TraceEvent<T,U> type, TypedEventDispatcher.SpaceValuesHandler<? super U> handler)

  - ### listenFor

    protected void listenFor(TraceEvent<?,?> type, TypedEventDispatcher.IgnoreValuesHandler handler)

  - ### listenFor

    protected void listenFor(TraceEvent<?,?> type, TypedEventDispatcher.IgnoreAllHandler handler)

  - ### listenForUntyped

    protected void listenForUntyped(EventType type, Consumer<DomainObjectChangeRecord> handler)

  - ### handleChangeRecord

    public void handleChangeRecord(DomainObjectChangeRecord rec)

  - ### handleTraceChangeRecord

    public void handleTraceChangeRecord(TraceChangeRecord<?,?> rec)

  - ### unhandled

    protected void unhandled(DomainObjectChangeRecord rec)