- All Known Subinterfaces:
ChildInvocationObserver,CollocatedObserver,ConnectionObserver,DispatchObserver,InvocationObserver,RemoteObserver,ThreadObserver
- All Known Implementing Classes:
Observer,ObserverWithDelegate,ObserverWithDelegateI
public interface Observer
The object observer interface used by instrumented objects to notify the observer of their existence.
-
Method Summary
Modifier and TypeMethodDescriptionvoidattach()This method is called when the instrumented object is created or when the observer is attached to an existing object.voiddetach()This method is called when the instrumented object is destroyed and as a result the observer detached from the object.voidNotifies the observer of a failure.
-
Method Details
-
attach
void attach()This method is called when the instrumented object is created or when the observer is attached to an existing object. -
detach
void detach()This method is called when the instrumented object is destroyed and as a result the observer detached from the object. -
failed
Notifies the observer of a failure.- Parameters:
exceptionName- The name of the exception.
-