Top Description Methods
org.glassfish.hk2.api

public Interface InstanceLifecycleEvent

Imports
java.util.Map

This object contains information about a lifecycle event. Not all fields are valid for all lifecycle event types
Author
jwells

Method Summary

Modifier and TypeMethod and Description
public ActiveDescriptor<?>

Returns:

The descriptor associated with this event
getActiveDescriptor
()

The active descriptor that is being used for the operation.

public InstanceLifecycleEventType

Returns:

The type of event being described
getEventType
()

Gets the type of event this describes.

public Map<Injectee, Object>

Returns:

The known map of injection point to injected object, if that information is known. Will be null in the PRE_DESTRUCTION case and in the case where the system does not know the values.
getKnownInjectees
()

A map from the Injectee to the object actually used in the production, if known.

public Object

Returns:

The object that was produced or will be destroyed. Will be null in the PRE_PRODUCTION case
getLifecycleObject
()

The object that is being described by this event.

Method Detail

getActiveDescriptorback to summary
public ActiveDescriptor<?> getActiveDescriptor()

The active descriptor that is being used for the operation. For PRE_PRODUCTION and POST_PRODUCTION this is the descriptor that will create or that created the object. For PRE_DESTRUCTION this is the descriptor that will be used to destroy the object

Returns:ActiveDescriptor<?>

The descriptor associated with this event

getEventTypeback to summary
public InstanceLifecycleEventType getEventType()

Gets the type of event this describes. The values may be:

  • PRE_PRODUCTION
  • POST_PRODUCTION
  • PRE_DESTRUCTION
Returns:InstanceLifecycleEventType

The type of event being described

getKnownInjecteesback to summary
public Map<Injectee, Object> getKnownInjectees()

A map from the Injectee to the object actually used in the production, if known. This will return null in the PRE_DESTRUCTION case. In the PRE_PRODUCTION and POST_PRODUCTION cases this will return non-null if the system knows the objects that will be or were injected into the produced object. If this method returns null in the PRE_PRODUCTION or POST_PRODUCTION case then the system does not know what objects were injected into the produced object, which happens in the case of objects created by a Factory or objects created by third-party (pre-reified) ActiveDescriptors. If this method returns an empty map then the system knows that nothing will be or was injected into to produced object.

Returns:Map<Injectee, Object>

The known map of injection point to injected object, if that information is known. Will be null in the PRE_DESTRUCTION case and in the case where the system does not know the values.

getLifecycleObjectback to summary
public Object getLifecycleObject()

The object that is being described by this event. In the POST_PRODUCTION case this is the object that was just produced. In the PRE_DESTRUCTION case this is the object that will be destroyed. Will be null in the PRE_PRODUCTION case

Returns:Object

The object that was produced or will be destroyed. Will be null in the PRE_PRODUCTION case