Package org.nuxeo.runtime
Class ComponentEvent
- java.lang.Object
-
- org.nuxeo.runtime.ComponentEvent
-
public class ComponentEvent extends Object
A component event.The following event types are defined:
COMPONENT_REGISTERED
Sent when registering a component after the component is createdCOMPONENT_UNREGISTERED
Sent when unregistering a component before the component is destroyedACTIVATING_COMPONENT
Sent before a component is activatedCOMPONENT_ACTIVATED
Sent after the component is activatedDEACTIVATING_COMPONENT
Sent before a component is deactivatedCOMPONENT_DEACTIVATED
Sent after a component is deactivatedCOMPONENT_RESOLVED
Sent when a component was resolved (all dependencies are satisfied)COMPONENT_UNRESOLVED
Sent when a component is unresolved (either it will be unregistered, either one of its dependencies is no more satisfied)COMPONENT_STARTED
Sent when a component was started (even when component is not a java instance)COMPONENT_STOPPED
Sent when a component was stopped (even when component is not a java instance)EXTENSION_REGISTERED
Sent when a component contribution to an extension point is registeredEXTENSION_UNREGISTERED
Sent when a component contribution to an extension point is unregisteredEXTENSION_PENDING
Sent when a component contribution to an extension point is pending, waiting for dependencies to be resolved.COMPONENT_EVENT
May be used by components to end custom events
Ordering of events for a given component:
COMPONENT_REGISTERED
COMPONENT_RESOLVED
(if the component dependencies were satisfied)
ACTIVATING_COMPONENT
COMPONENT_ACTIVATED
EXTENSION_PENDING
(if an extension is pending)EXTENSION_REGISTERED
(if an extension is registered)
STARTING_COMPONENT
COMPONENT_STARTED
EXTENSION_UNREGISTERED
(if an extension was registered)
STOPPING_COMPONENT
COMPONENT_STOPPED
DEACTIVATING_COMPONENT
COMPONENT_DEACTIVATED
COMPONENT_UNRESOLVED
COMPONENT_UNREGISTERED
- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description static int
ACTIVATING_COMPONENT
static int
COMPONENT_ACTIVATED
static int
COMPONENT_DEACTIVATED
static int
COMPONENT_EVENT
static int
COMPONENT_REGISTERED
static int
COMPONENT_RESOLVED
static int
COMPONENT_STARTED
static int
COMPONENT_STOPPED
static int
COMPONENT_UNREGISTERED
static int
COMPONENT_UNRESOLVED
Serializable
data
Optional event data.static int
DEACTIVATING_COMPONENT
static int
EXTENSION_PENDING
static int
EXTENSION_REGISTERED
static int
EXTENSION_UNREGISTERED
int
id
The event id.RegistrationInfo
registrationInfo
The component this event relates to if any, null otherwise.static int
STARTING_COMPONENT
static int
STOPPING_COMPONENT
-
Constructor Summary
Constructors Constructor Description ComponentEvent(int id, RegistrationInfo ri)
ComponentEvent(int id, RegistrationInfo ri, Serializable data)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getEventName()
Gets the event name as a string.static String
getEventName(int id)
Returns the event name given an integer id.String
toString()
-
-
-
Field Detail
-
COMPONENT_REGISTERED
public static final int COMPONENT_REGISTERED
- See Also:
- Constant Field Values
-
ACTIVATING_COMPONENT
public static final int ACTIVATING_COMPONENT
- See Also:
- Constant Field Values
-
DEACTIVATING_COMPONENT
public static final int DEACTIVATING_COMPONENT
- See Also:
- Constant Field Values
-
COMPONENT_ACTIVATED
public static final int COMPONENT_ACTIVATED
- See Also:
- Constant Field Values
-
COMPONENT_DEACTIVATED
public static final int COMPONENT_DEACTIVATED
- See Also:
- Constant Field Values
-
COMPONENT_UNREGISTERED
public static final int COMPONENT_UNREGISTERED
- See Also:
- Constant Field Values
-
COMPONENT_RESOLVED
public static final int COMPONENT_RESOLVED
- See Also:
- Constant Field Values
-
COMPONENT_UNRESOLVED
public static final int COMPONENT_UNRESOLVED
- See Also:
- Constant Field Values
-
EXTENSION_REGISTERED
public static final int EXTENSION_REGISTERED
- See Also:
- Constant Field Values
-
EXTENSION_UNREGISTERED
public static final int EXTENSION_UNREGISTERED
- See Also:
- Constant Field Values
-
EXTENSION_PENDING
public static final int EXTENSION_PENDING
- See Also:
- Constant Field Values
-
STARTING_COMPONENT
public static final int STARTING_COMPONENT
- See Also:
- Constant Field Values
-
STOPPING_COMPONENT
public static final int STOPPING_COMPONENT
- See Also:
- Constant Field Values
-
COMPONENT_STARTED
public static final int COMPONENT_STARTED
- See Also:
- Constant Field Values
-
COMPONENT_STOPPED
public static final int COMPONENT_STOPPED
- See Also:
- Constant Field Values
-
COMPONENT_EVENT
public static final int COMPONENT_EVENT
- See Also:
- Constant Field Values
-
id
public final int id
The event id.
-
registrationInfo
public final RegistrationInfo registrationInfo
The component this event relates to if any, null otherwise.
-
data
public final Serializable data
Optional event data.
-
-
Constructor Detail
-
ComponentEvent
public ComponentEvent(int id, RegistrationInfo ri)
-
ComponentEvent
public ComponentEvent(int id, RegistrationInfo ri, Serializable data)
-
-