org.glassfish.hk2.api
Interface InstanceLifecycleListener

All Known Implementing Classes:
ConfigInstanceListener

@Contract
public interface InstanceLifecycleListener

This processor is called for certain events in the lifecycle of instances of services.

This listener is concerned with instances of services, whereas the ValidationService is concerned with the descriptors for services.

Author:
jwells

Method Summary
 Filter getFilter()
          This returns a filter that tells the system whether a particular descriptor should be handled by this lifecycle listener.
 void lifecycleEvent(InstanceLifecycleEvent lifecycleEvent)
          This method will be called when any lifecycle event occurs.
 

Method Detail

getFilter

Filter getFilter()
This returns a filter that tells the system whether a particular descriptor should be handled by this lifecycle listener. The filter can be called at any time

Returns:
The filter that tells the system if this listener applies to this descriptor. If this returns null then this Listener will apply to ALL descriptors.

lifecycleEvent

void lifecycleEvent(InstanceLifecycleEvent lifecycleEvent)
This method will be called when any lifecycle event occurs. The currently supported lifecycle events are POST_PRODUCTION and PRE_DESTRUCTION. Code should be written to allow for future events to be generated.

Parameters:
lifecycleEvent - The event that has occurred, will not be null


Copyright © 2013 Oracle Corporation. All Rights Reserved.