com.jrockit.mc.flightrecorder.spi
Class Provider

java.lang.Object
  extended by com.jrockit.mc.flightrecorder.spi.Provider
Direct Known Subclasses:
EmptyProvider, FileProvider, StreamProvider

public abstract class Provider
extends java.lang.Object

Abstract base class for providers. Used by the FlightRecording class to get event data. By default System out is used for printing progress. Provider implementers should override createRepository() and forward the progress monitor or other configuration details to their implementation of the IRepository.

Author:
Erik Gahlin

Constructor Summary
Provider()
           
 
Method Summary
abstract  IRepository createRepository()
          Create the IRepository for the provider.
 IEventFilter getFilter()
          Returns the filter to use when creating the repository, null means no filtering should take place.
 IProgressMonitor getProgressMonitor()
           
 void setFilter(IEventFilter filter)
          Sets the filter to use when creating the repository.
 void setProgressMonitor(IProgressMonitor monitor)
          Sets the progress monitor that should be used when constructing the IRepository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Provider

public Provider()
Method Detail

getProgressMonitor

public final IProgressMonitor getProgressMonitor()

setFilter

public final void setFilter(IEventFilter filter)
Sets the filter to use when creating the repository. If the filter is null, no filter will be used.

Parameters:
filter -

getFilter

public final IEventFilter getFilter()
Returns the filter to use when creating the repository, null means no filtering should take place.

Returns:
the filter

setProgressMonitor

public final void setProgressMonitor(IProgressMonitor monitor)
Sets the progress monitor that should be used when constructing the IRepository

Parameters:
monitor - a progress monitor.

createRepository

public abstract IRepository createRepository()
Create the IRepository for the provider.

Returns:
teh provider or null if the provider could no be constrctued.


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