Class BmRawEventHandler

java.lang.Object
com._1c.g5.v8.internal.derived.BmRawEventHandler
All Implemented Interfaces:
IBmSyncEventListener, BiConsumer<BmEvent,Boolean>

public class BmRawEventHandler extends Object implements IBmSyncEventListener, BiConsumer<BmEvent,Boolean>
Component that listen raw changes of the BM. Once it receives an event, it checks, if the change requires re-computation of derived data. If it does, updates the synchronous DD calculation context.
See Also:
  • Constructor Details

    • BmRawEventHandler

      public BmRawEventHandler(IBmModel bmModel, Collection<IContextCollector> syncContextCollectors, Collection<IRemovalContextCollector> syncRemovalContextCollectors, IDerivedDataContextManager derivedDataContextManager)
      Creates an instance of the DD BM raw event handler.
      Parameters:
      bmModel - The sourse BM model. Cannot be null.
      syncContextCollectors - The collection of the synchronous context collectors. Cannot be null.
      syncRemovalContextCollectors - the removal context collectors. Cannot be null.
      derivedDataContextManager - The DD context manager. Cannot be null.
  • Method Details

    • handleSyncEvent

      public void handleSyncEvent(BmEvent event)
      Description copied from interface: IBmSyncEventListener
      Invoked to notify about a BM event.
      Specified by:
      handleSyncEvent in interface IBmSyncEventListener
      Parameters:
      event - the BM event. Never null.
    • start

      public void start()
      Starts the work of the RAW event handler. Attaches to BM model an do additional configuration.
    • stop

      public void stop()
      Stops the handler, unregistering from the model
    • accept

      public void accept(BmEvent bmEvent, Boolean confirmed)
      Specified by:
      accept in interface BiConsumer<BmEvent,Boolean>