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_REGISTEREDSent when registering a component after the component is createdCOMPONENT_UNREGISTEREDSent when unregistering a component before the component is destroyedACTIVATING_COMPONENTSent before a component is activatedCOMPONENT_ACTIVATEDSent after the component is activatedDEACTIVATING_COMPONENTSent before a component is deactivatedCOMPONENT_DEACTIVATEDSent after a component is deactivatedCOMPONENT_RESOLVEDSent when a component was resolved (all dependencies are satisfied)COMPONENT_UNRESOLVEDSent when a component is unresolved (either it will be unregistered, either one of its dependencies is no more satisfied)COMPONENT_STARTEDSent when a component was started (even when component is not a java instance)COMPONENT_STOPPEDSent when a component was stopped (even when component is not a java instance)EXTENSION_REGISTEREDSent when a component contribution to an extension point is registeredEXTENSION_UNREGISTEREDSent when a component contribution to an extension point is unregisteredEXTENSION_PENDINGSent when a component contribution to an extension point is pending, waiting for dependencies to be resolved.COMPONENT_EVENTMay be used by components to end custom events
Ordering of events for a given component:
COMPONENT_REGISTEREDCOMPONENT_RESOLVED(if the component dependencies were satisfied)
ACTIVATING_COMPONENTCOMPONENT_ACTIVATED
EXTENSION_PENDING(if an extension is pending)EXTENSION_REGISTERED(if an extension is registered)
STARTING_COMPONENTCOMPONENT_STARTED
EXTENSION_UNREGISTERED(if an extension was registered)
STOPPING_COMPONENTCOMPONENT_STOPPED
DEACTIVATING_COMPONENTCOMPONENT_DEACTIVATEDCOMPONENT_UNRESOLVEDCOMPONENT_UNREGISTERED
- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description static intACTIVATING_COMPONENTstatic intCOMPONENT_ACTIVATEDstatic intCOMPONENT_DEACTIVATEDstatic intCOMPONENT_EVENTstatic intCOMPONENT_REGISTEREDstatic intCOMPONENT_RESOLVEDstatic intCOMPONENT_STARTEDstatic intCOMPONENT_STOPPEDstatic intCOMPONENT_UNREGISTEREDstatic intCOMPONENT_UNRESOLVEDSerializabledataOptional event data.static intDEACTIVATING_COMPONENTstatic intEXTENSION_PENDINGstatic intEXTENSION_REGISTEREDstatic intEXTENSION_UNREGISTEREDintidThe event id.RegistrationInforegistrationInfoThe component this event relates to if any, null otherwise.static intSTARTING_COMPONENTstatic intSTOPPING_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 StringgetEventName()Gets the event name as a string.static StringgetEventName(int id)Returns the event name given an integer id.StringtoString()
-
-
-
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)
-
-