@Contract public interface InstanceLifecycleListener
This listener is concerned with instances of services, whereas the
ValidationService
is concerned with the descriptors for services.
An implementation of InstanceLifecycleListener must be in the Singleton scope.
Implementations of InstanceLifecycleListener will be instantiated as soon as
they are added to HK2 in order to avoid deadlocks and circular references.
Therefore it is recommended that implementations of InstanceLifecycleListener
make liberal use of Provider
or IterableProvider
when injecting dependent services so that these services are not instantiated
when the InstanceLifecycleListener is created
Modifier and Type | Method and Description |
---|---|
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.
|
Filter getFilter()
void lifecycleEvent(InstanceLifecycleEvent lifecycleEvent)
lifecycleEvent
- The event that has occurred, will not be nullCopyright © 2009-2017, Oracle and/or its affiliates. All Rights Reserved.