com.jrockit.mc.rjmx.flr
Class FlightRecorderToolkit

java.lang.Object
  extended by com.jrockit.mc.rjmx.flr.FlightRecorderToolkit

public final class FlightRecorderToolkit
extends java.lang.Object

Helper methods to facilitate the use of the IFlightRecorderService.

Author:
Marcus Hirt

Method Summary
static IRecordingDescriptor getDescriptorByID(IRecordingDescriptor[] descriptors, java.lang.Integer id)
          Will return the first descriptor matching the id.
static IRecordingDescriptor getDescriptorByName(IRecordingDescriptor[] descriptors, java.lang.String name)
          Will return the first descriptor matching the name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDescriptorByName

public static IRecordingDescriptor getDescriptorByName(IRecordingDescriptor[] descriptors,
                                                       java.lang.String name)
Will return the first descriptor matching the name. Since there is usually very few recordings available, we just do a linear search.

Parameters:
name - the name to look for.
descriptors - the descriptors to search.
Returns:
the matching descriptor, or null if none was found.

getDescriptorByID

public static IRecordingDescriptor getDescriptorByID(IRecordingDescriptor[] descriptors,
                                                     java.lang.Integer id)
Will return the first descriptor matching the id. Since there is usually very few recordings available, we just do a linear search.

Parameters:
id - the id to look for.
descriptors - the descriptors to search.
Returns:
the matching descriptor, or null if none was found.


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