public class SectionModifiedIndexer
extends neo.xredsys.api.services.AsyncEventListenerService
GenericService.StartCommand, GenericService.StopCommand
Modifier and Type | Field and Description |
---|---|
static String |
CLASS_VERSION
The version of this class.
|
mLogger, state
Constructor and Description |
---|
SectionModifiedIndexer() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
accept(IOEvent pEvent)
This method is called synchronously, so it is recommended that you only do initial filtering that are fast to execute in this method.
|
neo.xredsys.acl.ACLManager |
getACLManager() |
HitCollector |
getIndexCollector()
The
HitCollector we want to register event hit against. |
Indexer |
getIndexer() |
ObjectLoader |
getObjectLoader() |
protected void |
handle(IOEvent pEvent)
This method is called from
AsyncEventListenerService.handleEvent(IOEvent) to let an IOEventListener respond to an IOEvent . |
void |
setACLManager(neo.xredsys.acl.ACLManager pACLManager) |
void |
setIndexCollector(HitCollector pCollector)
The
HitCollector we want to register event hit against. |
void |
setIndexer(Indexer pIndexer) |
void |
setObjectLoader(ObjectLoader pObjectLoader) |
protected void |
startEventListener()
Template method: A no operation implementation that is called from
AsyncEventListenerService.startService() before it has registered itself with the AsyncEventListenerService.getEventManager() . |
acceptEvent, getBacklog, getCollector, getEventManager, getService, handleEvent, isLocalOnly, setCollector, setEventManager, startService, stopEventListener, stopService
doStartService, doStopService, stopIdleService
assertServiceRunning, getServiceDescription, getServiceMessage, getServiceState, isServiceEnabled, isServiceFailed, isServiceIdle, isServiceRunning, isServiceShutdownFailed, isServiceStopped, setServiceDescription, setServiceEnabled, start, stop, validateIsTrue, validateNotNull
public static final String CLASS_VERSION
public void setIndexer(Indexer pIndexer)
pIndexer
- the indexer to setpublic Indexer getIndexer()
public void setACLManager(neo.xredsys.acl.ACLManager pACLManager)
pACLManager
- the aCLManager to setpublic neo.xredsys.acl.ACLManager getACLManager()
public void setObjectLoader(ObjectLoader pObjectLoader)
pObjectLoader
- the objectLoader to setpublic ObjectLoader getObjectLoader()
public final void setIndexCollector(HitCollector pCollector)
HitCollector
we want to register event hit against. Typically invoked by GlobalBus Nursery
when configuring this AsyncEventListenerService
.pCollector
- the HitCollector
we want to usepublic final HitCollector getIndexCollector()
HitCollector
we want to register event hit against. There will be no failures recorded if we don't have a HitCollector
, but
it is strongly recommended to have one.null
if not set.protected boolean accept(IOEvent pEvent) throws Exception
neo.xredsys.api.services.AsyncEventListenerService
This method is called synchronously, so it is recommended that you only do initial filtering that are fast to execute in this method.
accept
in class neo.xredsys.api.services.AsyncEventListenerService
pEvent
- the event to accepttrue
if the event is to be accepted, false
otherwiseException
- when any unknown error happensprotected void handle(IOEvent pEvent) throws Exception
neo.xredsys.api.services.AsyncEventListenerService
This method is called from AsyncEventListenerService.handleEvent(IOEvent)
to let an IOEventListener
respond to an IOEvent
. The IOEventListener
may throw any type of exception; these
exceptions will be logged by AsyncEventListenerService.handleEvent(IOEvent)
.
Only called from AsyncEventListenerService.handleEvent(IOEvent)
when GenericService.isServiceRunning()
returns true
.
handle
in class neo.xredsys.api.services.AsyncEventListenerService
pEvent
- the eventException
- when any unknown error happensprotected void startEventListener() throws IllegalStateException, IllegalArgumentException, Exception
neo.xredsys.api.services.AsyncEventListenerService
Template method: A no operation implementation that is called from AsyncEventListenerService.startService()
before it has registered itself with the AsyncEventListenerService.getEventManager()
.
Subclasses might override this to do their own start up logic, by example validation of configuration.
startEventListener
in class neo.xredsys.api.services.AsyncEventListenerService
IllegalStateException
- when this IOEventListener
is in the wrong state for startup. Used to signal to AbstractNurseryService.doStartService()
that it is OK to try to starting
this service
later. GenericService.isServiceRunning()
returns false
and GenericService.isServiceIdle()
returns
true
.IllegalArgumentException
- when the configuration of the service
is invalid. GenericService.isServiceRunning()
will return false
and
GenericService.isServiceFailed()
will return true
.Exception
- when something goes wrong during startup. GenericService.isServiceRunning()
will return false
and GenericService.isServiceFailed()
will return
true
.AsyncEventListenerService.startService()
© 1998- 2021 Escenic AS