Class ReconnectedEventBundleImpl

java.lang.Object
org.nuxeo.ecm.core.event.impl.ReconnectedEventBundleImpl
All Implemented Interfaces:
Serializable, Iterable<Event>, EventBundle, ReconnectedEventBundle

public class ReconnectedEventBundleImpl extends Object implements ReconnectedEventBundle
Default implementation for an EventBundle that need to be reconnected to a usable Session.
Author:
tiry
See Also:
  • Field Details

    • sourceEventBundle

      protected EventBundle sourceEventBundle
    • listenerName

      protected String listenerName
      Lister name or names.
    • reconnectedEvents

      protected transient List<Event> reconnectedEvents
    • loginCtx

      protected transient NuxeoLoginContext loginCtx
    • reconnectedCoreSession

      protected transient CoreSession reconnectedCoreSession
  • Constructor Details

    • ReconnectedEventBundleImpl

      protected ReconnectedEventBundleImpl()
    • ReconnectedEventBundleImpl

      public ReconnectedEventBundleImpl(EventBundle sourceEventBundle)
    • ReconnectedEventBundleImpl

      public ReconnectedEventBundleImpl(EventBundle sourceEventBundle, String listenerName)
      Since:
      5.6
  • Method Details

    • getReconnectedCoreSession

      protected CoreSession getReconnectedCoreSession(String repoName, String originatingUsername)
    • getReconnectedEvents

      protected List<Event> getReconnectedEvents()
    • refetchDocumentModel

      protected boolean refetchDocumentModel(CoreSession session, Object eventProperty)
    • getName

      public String getName()
      Description copied from interface: EventBundle
      Gets the bundle name.

      This is usually the first event repository name in the bundle but the implementation may decide to change this behavior.

      Specified by:
      getName in interface EventBundle
      Returns:
      the bundle name. Can be null only if the bundle is empty.
    • getSourceVMID

      public VMID getSourceVMID()
      Description copied from interface: EventBundle
      Returns the VMID of the JVM where the bundle was created.
      Specified by:
      getSourceVMID in interface EventBundle
    • hasRemoteSource

      public boolean hasRemoteSource()
      Description copied from interface: EventBundle
      Tests whether or not this event bundle was created on a remote machine.
      Specified by:
      hasRemoteSource in interface EventBundle
      Returns:
      true if the event bundle was fired from a remote machine, false otherwise
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: EventBundle
      Tests whether or not this bundle is empty.
      Specified by:
      isEmpty in interface EventBundle
    • peek

      public Event peek()
      Description copied from interface: EventBundle
      Gets the first event in that bundle.
      Specified by:
      peek in interface EventBundle
      Returns:
      the first event. Can be null if the bundle is empty
    • push

      public void push(Event event)
      Description copied from interface: EventBundle
      Adds an event in that bundle at the end of the list.

      The bundle implementation must ignore redundant events and events marked as inline.

      Specified by:
      push in interface EventBundle
      Parameters:
      event - the event to append.
    • size

      public int size()
      Description copied from interface: EventBundle
      Gets the size of that bundle.
      Specified by:
      size in interface EventBundle
      Returns:
      the number of events in that bundle
    • iterator

      public Iterator<Event> iterator()
      Specified by:
      iterator in interface Iterable<Event>
    • disconnect

      public void disconnect()
      Description copied from interface: ReconnectedEventBundle
      Manage cleanup after processing.
      Specified by:
      disconnect in interface ReconnectedEventBundle
    • containsEventName

      public boolean containsEventName(String eventName)
      Description copied from interface: EventBundle
      Check is bundle contains the specified event.
      Specified by:
      containsEventName in interface EventBundle
    • getEventNames

      public List<String> getEventNames()