com.jrockit.mc.rjmx.flr
Interface IFlightRecorderService

All Known Implementing Classes:
R28FlightRecorderService

public interface IFlightRecorderService

This is the interface for the JRockit Flight Recorder controller. Implementation, if available, can be retrieved from an IConnectionHandle.getService(Class)

Author:
Marcus Hirt, Mattias Jo\xEBlson

Method Summary
 void close(IRecordingDescriptor descriptor)
          Closes the recording represented by the IRecordingDescriptor.
 EventTypeMetadata[] getAvailableEventTypes()
           
 OptionMetadata[] getAvailableRecordingOptions()
          Returns the metadata for the available recording options.
 IRecordingDescriptor[] getAvailableRecordings()
          Returns the available JRockit Flight Recorder recordings.
 EventTypeSetting[] getCurrentEventTypeSettings()
          Returns the current settings for the event types.
 EventTypeSetting[] getEventSettings(IRecordingDescriptor recording)
          Returns the event settings for the specified recording.
 Option[] getRecordingOptions(IRecordingDescriptor recording)
          Returns the recording options for the specified recording.
 EventTemplate[] getServerTemplates()
           
 IRecordingDescriptor getUpdatedRecordingDescripton(IRecordingDescriptor descriptor)
          Returns the updated recording descriptor for the specified recording.
 java.io.InputStream openStream(IRecordingDescriptor descriptor, boolean removeOnClose)
          Opens a stream from the specified recording.
 java.io.InputStream openStream(IRecordingDescriptor descriptor, java.util.Date startTime, java.util.Date endTime, boolean removeOnClose)
          Opens a stream from the specified recording between the specified times.
 java.io.InputStream openStream(IRecordingDescriptor descriptor, long time, boolean removeOnClose)
          Opens a stream from the specified recording for the past "time" milliseconds.
 IRecordingDescriptor start(java.util.Map recordingOptions, EventTypeSetting[] eventSettings)
          Starts a new JRockit Flight Recorder recording.
 void stop(IRecordingDescriptor descriptor)
          Stops the recording represented by the IRecordingDescriptor.
 void updateEventSettings(IRecordingDescriptor descriptor, EventTypeSetting[] settings)
          Updates the event settings for the specified descriptor.
 void updateRecordingOptions(IRecordingDescriptor descriptor, java.util.Map options)
          Updates the recording options for the specified recording.
 

Method Detail

getAvailableRecordings

IRecordingDescriptor[] getAvailableRecordings()
                                              throws FlightRecorderException
Returns the available JRockit Flight Recorder recordings. The immutable descriptor represents the state at the time the method was called. To get an updated representation the method must be called again.

Returns:
the available Flight Recording recordings.
Throws:
FlightRecorderException

getUpdatedRecordingDescripton

IRecordingDescriptor getUpdatedRecordingDescripton(IRecordingDescriptor descriptor)
                                                   throws FlightRecorderException
Returns the updated recording descriptor for the specified recording.

Parameters:
descriptor - the recording for which to get the recording descriptor.
Returns:
the recording descriptor for the specified recording id.
Throws:
FlightRecorderException

start

IRecordingDescriptor start(java.util.Map recordingOptions,
                           EventTypeSetting[] eventSettings)
                           throws FlightRecorderException
Starts a new JRockit Flight Recorder recording.

Parameters:
recordingOptions - the recording options. Use RecordingOptionsBuilder to create.
eventSettings - the event settings.
Returns:
the IRecordingDescriptor representing the started recording.
Throws:
FlightRecorderException - if there was a problem starting the recording.

stop

void stop(IRecordingDescriptor descriptor)
          throws FlightRecorderException
Stops the recording represented by the IRecordingDescriptor.

Parameters:
descriptor - the recording to stop.
Throws:
FlightRecorderException - if there was a problem stopping the recording.

close

void close(IRecordingDescriptor descriptor)
           throws FlightRecorderException
Closes the recording represented by the IRecordingDescriptor. A closed recording will no longer be listed among the available recordings. It's corresponding MBean will be removed.

Parameters:
descriptor - the recording to close.
Throws:
FlightRecorderException - if there was a problem closing the recording.

getAvailableRecordingOptions

OptionMetadata[] getAvailableRecordingOptions()
                                              throws FlightRecorderException
Returns the metadata for the available recording options.

Returns:
the available recording options.
Throws:
FlightRecorderException - if there was a problem retrieving the recording options.

getRecordingOptions

Option[] getRecordingOptions(IRecordingDescriptor recording)
                             throws FlightRecorderException
Returns the recording options for the specified recording. Note that options can be changed over time. The Option is immutable - call again to get the updated settings for a particular recording.

Parameters:
recording - the recording for which to retrieve the Options.
Returns:
the Options for the specified recording.
Throws:
FlightRecorderException - if there was a problem retrieving the options.

getAvailableEventTypes

EventTypeMetadata[] getAvailableEventTypes()
                                           throws FlightRecorderException
Returns:
the metadata for all known event types.
Throws:
FlightRecorderException - if there was a problem retrieving the metadata.

getCurrentEventTypeSettings

EventTypeSetting[] getCurrentEventTypeSettings()
                                               throws FlightRecorderException
Returns the current settings for the event types.

Returns:
the current settings for the event types.
Throws:
FlightRecorderException - if there was a problem retrieving the settings.

getEventSettings

EventTypeSetting[] getEventSettings(IRecordingDescriptor recording)
                                    throws FlightRecorderException
Returns the event settings for the specified recording.

Parameters:
recording - the recording for which to return the settings.
Returns:
the event settings for the specified recording.
Throws:
FlightRecorderException

openStream

java.io.InputStream openStream(IRecordingDescriptor descriptor,
                               boolean removeOnClose)
                               throws FlightRecorderException
Opens a stream from the specified recording. Will read all available data. The content of the stream is gzipped. You would normally want to wrap it in a GZIPInputStream.

Parameters:
descriptor - the recording from which to retrieve the data.
removeOnClose - whether the recording should be removed when the stream is closed or not
Returns:
an input stream from which to read the recording data.
Throws:
java.io.IOException - if there was a problem reading the recording data.
FlightRecorderException

openStream

java.io.InputStream openStream(IRecordingDescriptor descriptor,
                               java.util.Date startTime,
                               java.util.Date endTime,
                               boolean removeOnClose)
                               throws FlightRecorderException
Opens a stream from the specified recording between the specified times. The content of the stream is gzipped. You would normally want to wrap it in a GZIPInputStream. Note that the dates should be in server side time. Special care should be taken to make sure that server side time stamps are used.

Parameters:
descriptor - the recording from which to retrieve the data.
startTime - the start time.
endTime - the end time.
removeOnClose - whether the recording should be removed when the stream is closed or not
Returns:
an input stream from which to read the recording data.
Throws:
java.io.IOException - if there was a problem reading the recording data.
FlightRecorderException

openStream

java.io.InputStream openStream(IRecordingDescriptor descriptor,
                               long time,
                               boolean removeOnClose)
                               throws FlightRecorderException
Opens a stream from the specified recording for the past "time" milliseconds. The content of the stream is gzipped. You would normally want to wrap it in a GZIPInputStream.

Parameters:
descriptor - the recording from which to retrieve the data.
time - the number of milliseconds of data to retrieve.
removeOnClose - whether the recording should be removed when the stream is closed or not
Returns:
an input stream from which to read the recording data.
Throws:
FlightRecorderException - if there was a problem reading the recording data.

getServerTemplates

EventTemplate[] getServerTemplates()
                                   throws FlightRecorderException
Returns:
the server templates for event settings found on the server.
Throws:
FlightRecorderException

updateEventSettings

void updateEventSettings(IRecordingDescriptor descriptor,
                         EventTypeSetting[] settings)
                         throws FlightRecorderException
Updates the event settings for the specified descriptor.

Parameters:
descriptor - the recording to update the event settings for.
settings - the new, overriding, event settings. If null, the current settings will be used.
Throws:
FlightRecorderException

updateRecordingOptions

void updateRecordingOptions(IRecordingDescriptor descriptor,
                            java.util.Map options)
                            throws FlightRecorderException
Updates the recording options for the specified recording.

Parameters:
descriptor - the recording to update the event settings for.
options - the new options to set.
Throws:
FlightRecorderException


Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.