Package org.nuxeo.ecm.core.event.impl
Class ReconnectedEventBundleImpl
java.lang.Object
org.nuxeo.ecm.core.event.impl.ReconnectedEventBundleImpl
- All Implemented Interfaces:
Serializable
,Iterable<Event>
,EventBundle
,ReconnectedEventBundle
Default implementation for an
EventBundle
that need to be reconnected to a usable Session.- Author:
- tiry
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
Lister name or names.protected NuxeoLoginContext
protected CoreSession
protected EventBundle
Fields inherited from interface org.nuxeo.ecm.core.event.ReconnectedEventBundle
SKIP_REFETCH_DOCUMENT_CONTEXT_KEY
-
Constructor Summary
ModifierConstructorDescriptionprotected
ReconnectedEventBundleImpl
(EventBundle sourceEventBundle) ReconnectedEventBundleImpl
(EventBundle sourceEventBundle, String listenerName) -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsEventName
(String eventName) Check is bundle contains the specified event.void
Manage cleanup after processing.getName()
Gets the bundle name.protected CoreSession
getReconnectedCoreSession
(String repoName, String originatingUsername) Returns the VMID of the JVM where the bundle was created.boolean
Tests whether or not this event bundle was created on a remote machine.boolean
isEmpty()
Tests whether or not this bundle is empty.iterator()
peek()
Gets the first event in that bundle.void
Adds an event in that bundle at the end of the list.protected boolean
refetchDocumentModel
(CoreSession session, Object eventProperty) int
size()
Gets the size of that bundle.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
sourceEventBundle
-
listenerName
Lister name or names. -
reconnectedEvents
-
loginCtx
-
reconnectedCoreSession
-
-
Constructor Details
-
ReconnectedEventBundleImpl
protected ReconnectedEventBundleImpl() -
ReconnectedEventBundleImpl
-
ReconnectedEventBundleImpl
- Since:
- 5.6
-
-
Method Details
-
getReconnectedCoreSession
-
getReconnectedEvents
-
refetchDocumentModel
-
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 interfaceEventBundle
- Returns:
- the bundle name. Can be null only if the bundle is empty.
-
getSourceVMID
Description copied from interface:EventBundle
Returns the VMID of the JVM where the bundle was created.- Specified by:
getSourceVMID
in interfaceEventBundle
-
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 interfaceEventBundle
- 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 interfaceEventBundle
-
peek
Description copied from interface:EventBundle
Gets the first event in that bundle.- Specified by:
peek
in interfaceEventBundle
- Returns:
- the first event. Can be null if the bundle is empty
-
push
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 interfaceEventBundle
- 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 interfaceEventBundle
- Returns:
- the number of events in that bundle
-
iterator
-
disconnect
public void disconnect()Description copied from interface:ReconnectedEventBundle
Manage cleanup after processing.- Specified by:
disconnect
in interfaceReconnectedEventBundle
-
containsEventName
Description copied from interface:EventBundle
Check is bundle contains the specified event.- Specified by:
containsEventName
in interfaceEventBundle
-
getEventNames
-