com.jrockit.mc.flightrecorder
Class ProviderFactory

java.lang.Object
  extended by com.jrockit.mc.flightrecorder.ProviderFactory

public final class ProviderFactory
extends java.lang.Object

Factory class that creates providers for a FlightRecording.

Author:
Erik Gahlin

Method Summary
static Provider createClassPathProvider()
          Creates a provider by looking at the system property com.jrockit.mc.flightrecorder.provider for a suitable class name.
static FileProvider createDefaultFileProvider()
          Creates a JRockitFileProvider provider if the system property com.jrockit.mc.flightrecorder.provider is set to the name of class that implements FileProvider.
static Provider createJRockitFileProvider(java.io.File file)
          Creates a provider that is capable of opening up binary JRockit flight recording file.
static Provider createJRockitStreamProvider(java.io.InputStream is)
          Create a provider that can read JRokcit recording from an InputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createJRockitFileProvider

public static Provider createJRockitFileProvider(java.io.File file)
Creates a provider that is capable of opening up binary JRockit flight recording file.

Parameters:
file - the file to open
Returns:
a provider capable of reading JRockit recordings.

createClassPathProvider

public static Provider createClassPathProvider()
                                        throws java.lang.ClassNotFoundException,
                                               java.lang.InstantiationException,
                                               java.lang.IllegalAccessException
Creates a provider by looking at the system property com.jrockit.mc.flightrecorder.provider for a suitable class name.

Returns:
a provider or null if no provider class could be found
Throws:
java.lang.ClassNotFoundException - if no class with the given property name could be found
java.lang.IllegalAccessException - if the class could not be accessed.
java.lang.InstantiationException - if the class could not be instantiated.

createDefaultFileProvider

public static FileProvider createDefaultFileProvider()
Creates a JRockitFileProvider provider if the system property com.jrockit.mc.flightrecorder.provider is set to the name of class that implements FileProvider. If so, that class will be instantiated.

Returns:
a file provider

createJRockitStreamProvider

public static Provider createJRockitStreamProvider(java.io.InputStream is)
Create a provider that can read JRokcit recording from an InputStream

Parameters:
is - the InputStream to read from.
Returns:
the provider


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