org.jvnet.hk2.internal
Class InstanceLifecycleEventImpl

java.lang.Object
  extended by org.jvnet.hk2.internal.InstanceLifecycleEventImpl
All Implemented Interfaces:
InstanceLifecycleEvent

public class InstanceLifecycleEventImpl
extends Object
implements InstanceLifecycleEvent

Author:
jwells

Method Summary
 ActiveDescriptor<?> getActiveDescriptor()
          The active descriptor that is being used for the operation.
 InstanceLifecycleEventType getEventType()
          Gets the type of even this describes.
 Map<Injectee,Object> getKnownInjectees()
          A map from the Injectee to the object actually used in the production, if known.
 Object getLifecycleObject()
          The object that is being described by this event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getEventType

public InstanceLifecycleEventType getEventType()
Description copied from interface: InstanceLifecycleEvent
Gets the type of even this describes. The values may be:

Specified by:
getEventType in interface InstanceLifecycleEvent
Returns:
The type of event being described

getActiveDescriptor

public ActiveDescriptor<?> getActiveDescriptor()
Description copied from interface: InstanceLifecycleEvent
The active descriptor that is being used for the operation. For POST_PRODUCTION this is the descriptor that created the object. For PRE_DESTRUCTION this is the descriptor that will be used to destroy the object

Specified by:
getActiveDescriptor in interface InstanceLifecycleEvent
Returns:
The descriptor associated with this event

getLifecycleObject

public Object getLifecycleObject()
Description copied from interface: InstanceLifecycleEvent
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

Specified by:
getLifecycleObject in interface InstanceLifecycleEvent
Returns:
The object that was produced or will be destroyed

getKnownInjectees

public Map<Injectee,Object> getKnownInjectees()
Description copied from interface: InstanceLifecycleEvent
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 POST_PRODUCTION case this will return non-null if the system knows the objects that were injected into the produced object. If this method returns null in the 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-parth (pre-reified) ActiveDescriptors. If this method returns an empty map then the system knows that nothing was injected into to produced object.

Specified by:
getKnownInjectees in interface InstanceLifecycleEvent
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.


Copyright © 2013 Oracle Corporation. All Rights Reserved.