Package org.dspace.event
Class EventServiceImpl
- java.lang.Object
-
- org.dspace.event.EventServiceImpl
-
- All Implemented Interfaces:
EventService
public class EventServiceImpl extends Object implements EventService
Class for managing the content event environment. The EventManager mainly acts as a factory for Dispatchers, which are used by the Context to send events to consumers. It also contains generally useful utility methods. Version: $Revision$
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classEventServiceImpl.DispatcherPoolFactory
-
Field Summary
Fields Modifier and Type Field Description protected StringCONSUMER_PFXprotected Map<String,Integer>consumerIndiciesprotected EventServiceImpl.DispatcherPoolFactorydispatcherFactoryprotected org.apache.commons.pool2.KeyedObjectPooldispatcherPoolprotected org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfigpoolConfig-
Fields inherited from interface org.dspace.event.service.EventService
DEFAULT_DISPATCHER
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedEventServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidenumerateConsumers()intgetConsumerIndex(String consumerClass)DispatchergetDispatcher(String name)Get dispatcher for configuration named by "name".voidreturnDispatcher(String key, Dispatcher disp)
-
-
-
Field Detail
-
dispatcherFactory
protected EventServiceImpl.DispatcherPoolFactory dispatcherFactory
-
poolConfig
protected org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfig poolConfig
-
dispatcherPool
protected org.apache.commons.pool2.KeyedObjectPool dispatcherPool
-
CONSUMER_PFX
protected String CONSUMER_PFX
-
-
Method Detail
-
getDispatcher
public Dispatcher getDispatcher(String name)
Description copied from interface:EventServiceGet dispatcher for configuration named by "name". Returns cached instance if one exists.- Specified by:
getDispatcherin interfaceEventService- Parameters:
name- dispatcher name- Returns:
- chached instance of dispatcher
-
returnDispatcher
public void returnDispatcher(String key, Dispatcher disp)
- Specified by:
returnDispatcherin interfaceEventService
-
getConsumerIndex
public int getConsumerIndex(String consumerClass)
- Specified by:
getConsumerIndexin interfaceEventService
-
enumerateConsumers
protected void enumerateConsumers()
-
-