com.jrockit.mc.flightrecorder.spi
Class FileProvider

java.lang.Object
  extended by com.jrockit.mc.flightrecorder.spi.Provider
      extended by com.jrockit.mc.flightrecorder.spi.FileProvider

public abstract class FileProvider
extends Provider

Abstract base class for providers that can create an IRepository from a File

Author:
Erik Gahlin

Constructor Summary
FileProvider()
           
 
Method Summary
 IRepository createRepository()
          Create the IRepository for the provider.
abstract  IRepository createRepositoryFromFile(java.io.File file)
          Create an IRepository from a file
 java.io.File getFile()
          Returns the file used to create the the IRepository
 void setFile(java.io.File file)
          Sets the file that should be used to create the IRepository
 
Methods inherited from class com.jrockit.mc.flightrecorder.spi.Provider
getFilter, getProgressMonitor, setFilter, setProgressMonitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileProvider

public FileProvider()
Method Detail

setFile

public final void setFile(java.io.File file)
Sets the file that should be used to create the IRepository

Parameters:
file - the file input

getFile

public final java.io.File getFile()
Returns the file used to create the the IRepository

Returns:
the file

createRepository

public final IRepository createRepository()
Description copied from class: Provider
Create the IRepository for the provider.

Specified by:
createRepository in class Provider
Returns:
teh provider or null if the provider could no be constrctued.

createRepositoryFromFile

public abstract IRepository createRepositoryFromFile(java.io.File file)
                                              throws java.io.IOException
Create an IRepository from a file

Parameters:
file - the file to create the repository from
Returns:
teh repository
Throws:
java.io.IOException - if there were problem creating the repository from the file, e.g FileNotFoundException


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