Package org.nuxeo.ecm.core.event
Class EventServiceComponent
- java.lang.Object
-
- org.nuxeo.runtime.model.DefaultComponent
-
- org.nuxeo.ecm.core.event.EventServiceComponent
-
- All Implemented Interfaces:
Adaptable
,Component
,Extensible
,TimestampedService
public class EventServiceComponent extends DefaultComponent
Event Service Component, allowing registration of contributions and doing the event service shutdown upon deactivation.
-
-
Field Summary
Fields Modifier and Type Field Description static int
APPLICATION_STARTED_ORDER
static long
DEFAULT_SHUTDOWN_TIMEOUT
static String
DOMAIN_EVENT_PRODUCER_XP
static String
EVENT_DISPATCHER_XP
static String
EVENT_LISTENER_XP
static String
EVENT_PIPE_XP
protected EventServiceImpl
service
-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description EventServiceComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate(ComponentContext context)
Activates the component.void
applicationStarted(ComponentContext context)
Notify the component that Nuxeo Framework finished starting all Nuxeo bundles.void
deactivate(ComponentContext context)
Deactivates the component.<T> T
getAdapter(Class<T> adapter)
Returns an object which is an instance of the given class associated with this object.int
getApplicationStartedOrder()
The component notification order forComponent.applicationStarted(org.nuxeo.runtime.model.ComponentContext)
.void
registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
void
unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
-
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterExtension
-
-
-
-
Field Detail
-
APPLICATION_STARTED_ORDER
public static final int APPLICATION_STARTED_ORDER
- See Also:
- Constant Field Values
-
EVENT_LISTENER_XP
public static final String EVENT_LISTENER_XP
- See Also:
- Constant Field Values
-
EVENT_PIPE_XP
public static final String EVENT_PIPE_XP
- See Also:
- Constant Field Values
-
EVENT_DISPATCHER_XP
public static final String EVENT_DISPATCHER_XP
- See Also:
- Constant Field Values
-
DOMAIN_EVENT_PRODUCER_XP
public static final String DOMAIN_EVENT_PRODUCER_XP
- See Also:
- Constant Field Values
-
DEFAULT_SHUTDOWN_TIMEOUT
public static final long DEFAULT_SHUTDOWN_TIMEOUT
-
service
protected EventServiceImpl service
-
-
Constructor Detail
-
EventServiceComponent
public EventServiceComponent()
-
-
Method Detail
-
activate
public void activate(ComponentContext context)
Description copied from interface:Component
Activates the component.This method is called by the runtime when a component is activated.
- Specified by:
activate
in interfaceComponent
- Overrides:
activate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
applicationStarted
public void applicationStarted(ComponentContext context)
Description copied from interface:Component
Notify the component that Nuxeo Framework finished starting all Nuxeo bundles. Implementors must migrate the code of the applicationStarted and move it toComponent.start(ComponentContext)
andComponent.stop(ComponentContext)
methods
-
deactivate
public void deactivate(ComponentContext context)
Description copied from interface:Component
Deactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivate
in interfaceComponent
- Overrides:
deactivate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
getApplicationStartedOrder
public int getApplicationStartedOrder()
Description copied from interface:Component
The component notification order forComponent.applicationStarted(org.nuxeo.runtime.model.ComponentContext)
.Components are notified in increasing order. Order 1000 is the default order for components that don't care. Order 100 is the repository initialization.
- Returns:
- the order, 1000 by default
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
registerContribution
in classDefaultComponent
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
unregisterContribution
in classDefaultComponent
-
getAdapter
public <T> T getAdapter(Class<T> adapter)
Description copied from interface:Adaptable
Returns an object which is an instance of the given class associated with this object. Returnsnull
if no such object can be found.- Specified by:
getAdapter
in interfaceAdaptable
- Overrides:
getAdapter
in classDefaultComponent
- Parameters:
adapter
- the adapter class to look up- Returns:
- a object castable to the given class, or
null
if this object does not have an adapter for the given class
-
-