public abstract class AbstractHandleFirstNEventsListener extends BaseEventListener implements CountingListener
eventFilter, logger, name| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHandleFirstNEventsListener(EventListenerContext context,
EventFilter eventFilter,
int targetCount) |
|
AbstractHandleFirstNEventsListener(EventListenerContext context,
int targetCount) |
protected |
AbstractHandleFirstNEventsListener(EventListenerContext context,
java.lang.String name,
EventFilter eventFilter,
int targetCount) |
protected |
AbstractHandleFirstNEventsListener(EventListenerContext context,
java.lang.String name,
int targetCount) |
| Modifier and Type | Method and Description |
|---|---|
void |
doOnEvent(Event event) |
int |
getCount() |
int |
getTargetCount() |
protected abstract void |
handleFirstNTimes(Event event)
Implementation handle the event here.
|
boolean |
isFinished() |
java.lang.String |
toString() |
protected abstract void |
unsubscribe()
Implementations should unsubscribe here.
|
countThrowable, getEventCount, getEventListenerContext, getExceptionCount, getMillisExecuting, isUnsubscribeOnException, onEvent, publishFinishedEvent, setUnsubscribeOnException, shouldHandleEventclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitonEventpublic AbstractHandleFirstNEventsListener(EventListenerContext context, int targetCount)
protected AbstractHandleFirstNEventsListener(EventListenerContext context, EventFilter eventFilter, int targetCount)
protected AbstractHandleFirstNEventsListener(EventListenerContext context, java.lang.String name, int targetCount)
protected AbstractHandleFirstNEventsListener(EventListenerContext context, java.lang.String name, EventFilter eventFilter, int targetCount)
public void doOnEvent(Event event) throws java.lang.Exception
doOnEvent in class BaseEventListenerjava.lang.Exceptionprotected abstract void unsubscribe()
protected abstract void handleFirstNTimes(Event event) throws java.lang.Exception
event - java.lang.Exceptionpublic int getTargetCount()
getTargetCount in interface CountingListenerpublic int getCount()
getCount in interface CountingListenerpublic boolean isFinished()
isFinished in interface FinishingListenerpublic java.lang.String toString()
toString in class BaseEventListenerCopyright © 2018. All Rights Reserved.