org.picocontainer

Interface ComponentMonitor

public interface ComponentMonitor

A component monitor is responsible for monitoring the component instantiation and method invocation.

Since: 1.2

Method Summary
voidinstantiated(Constructor constructor, long duration)
Event thrown after the component has been instantiated using the given constructor
voidinstantiated(Constructor constructor, Object instantiated, Object[] injected, long duration)
Event thrown after the component has been instantiated using the given constructor.
voidinstantiating(Constructor constructor)
Event thrown as the component is being instantiated using the given constructor
voidinstantiationFailed(Constructor constructor, Exception cause)
Event thrown if the component instantiation failed using the given constructor
voidinvocationFailed(Method method, Object instance, Exception cause)
Event thrown if the component method invocation failed on the given instance
voidinvoked(Method method, Object instance, long duration)
Event thrown after the component method has been invoked on the given instance
voidinvoking(Method method, Object instance)
Event thrown as the component method is being invoked on the given instance
voidlifecycleInvocationFailed(Method method, Object instance, RuntimeException cause)
Event thrown if a lifecycle method invocation - start, stop or dispose - failed on the given instance

Method Detail

instantiated

public void instantiated(Constructor constructor, long duration)

Deprecated: since 1.3

Event thrown after the component has been instantiated using the given constructor

Parameters: constructor the Constructor used to instantiate the component duration the duration in millis of the instantiation

instantiated

public void instantiated(Constructor constructor, Object instantiated, Object[] injected, long duration)
Event thrown after the component has been instantiated using the given constructor. This should be called for both Constructor and Setter DI.

Parameters: constructor the Constructor used to instantiate the component instantiated the component that was instantiated by PicoContainer injected the components during instantiation. duration the duration in millis of the instantiation

Since: 1.3

instantiating

public void instantiating(Constructor constructor)
Event thrown as the component is being instantiated using the given constructor

Parameters: constructor the Constructor used to instantiate the component

instantiationFailed

public void instantiationFailed(Constructor constructor, Exception cause)
Event thrown if the component instantiation failed using the given constructor

Parameters: constructor the Constructor used to instantiate the component cause the Exception detailing the cause of the failure

invocationFailed

public void invocationFailed(Method method, Object instance, Exception cause)
Event thrown if the component method invocation failed on the given instance

Parameters: method the Method invoked on the component instance instance the component instance cause the Exception detailing the cause of the failure

invoked

public void invoked(Method method, Object instance, long duration)
Event thrown after the component method has been invoked on the given instance

Parameters: method the Method invoked on the component instance instance the component instance duration the duration in millis of the invocation

invoking

public void invoking(Method method, Object instance)
Event thrown as the component method is being invoked on the given instance

Parameters: method the Method invoked on the component instance instance the component instance

lifecycleInvocationFailed

public void lifecycleInvocationFailed(Method method, Object instance, RuntimeException cause)
Event thrown if a lifecycle method invocation - start, stop or dispose - failed on the given instance

Parameters: method the lifecycle Method invoked on the component instance instance the component instance cause the RuntimeException detailing the cause of the failure