-
public interface FlightRecorderListener
Callback interface to monitor Flight Recorder's life cycle.- Since:
- 9
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
recorderInitialized(FlightRecorder recorder)
Receives notification when Flight Recorder is initialized.default void
recordingStateChanged(Recording recording)
Receives notification when a recording is changing its state.
-
-
-
Method Detail
-
recorderInitialized
default void recorderInitialized(FlightRecorder recorder)
Receives notification when Flight Recorder is initialized.This method will also be invoked if a listener is added to an already initialized Flight Recorder.
Purpose of this method is to allow clients to implement their own initialization mechanism and be guaranteed that it is executed before a
FlightRecorder
instance is returned by.FlightRecorder#getFlightRecorder()
.The implementation of this method should return as soon as possible, to avoid blocking initialization of Flight Recorder.
The implementation of this method should not call
FlightRecorder.getFlightRecorder()
or start new recordings as it may lead to deadlocks or unexpected behavior.- Implementation Requirements:
- The default implementation of this method is empty.
- Parameters:
recorder
- Flight Recorder instance, notnull
- See Also:
FlightRecorder.addListener(FlightRecorderListener)
-
recordingStateChanged
default void recordingStateChanged(Recording recording)
Receives notification when a recording is changing its state.Callback will be invoked when a recording has reached the following states
RUNNING
,STOPPED
andCLOSED
. The implementation of this method should return as soon as possible so normal operation of Flight Recorder is not blocked.- Implementation Requirements:
- The default implementation of this method is empty.
- Parameters:
recording
- the recording where the state change occurred, notnull
- See Also:
FlightRecorder.addListener(FlightRecorderListener)
,RecordingState
-
-