org.apache.openjpa.instrumentation
Class InstrumentationManagerImpl

java.lang.Object
  extended by org.apache.openjpa.instrumentation.InstrumentationManagerImpl
All Implemented Interfaces:
InstrumentationManager, Closeable

public class InstrumentationManagerImpl
extends Object
implements InstrumentationManager

An implementation of an instrumentation manager.


Field Summary
 Set<InstrumentationProvider> _providers
           
 
Constructor Summary
InstrumentationManagerImpl()
           
 
Method Summary
 void close()
          Stops all providers
 Set<InstrumentationProvider> getProviders()
          Returns all providers as an unmodifiable set
 void initialize(OpenJPAConfiguration conf, PluginListValue pluginVal)
          Initializes all providers defined for the specified configuration.
 void manageProvider(InstrumentationProvider provider)
          Make a provider managed.
 void start(InstrumentationLevel level, Object context)
          Starts all providers at a specific level and context
 void stop(InstrumentationLevel level, Object context)
          Stops all providers at a specific level and context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_providers

public Set<InstrumentationProvider> _providers
Constructor Detail

InstrumentationManagerImpl

public InstrumentationManagerImpl()
Method Detail

initialize

public void initialize(OpenJPAConfiguration conf,
                       PluginListValue pluginVal)
Initializes all providers defined for the specified configuration.

Specified by:
initialize in interface InstrumentationManager
Parameters:
conf -
providers -

manageProvider

public void manageProvider(InstrumentationProvider provider)
Make a provider managed. This will bind its instrumentation to InstrumentationLevel type events (factory create/close, broker create/close).

Specified by:
manageProvider in interface InstrumentationManager
Parameters:
provider -
config -

getProviders

public Set<InstrumentationProvider> getProviders()
Returns all providers as an unmodifiable set

Specified by:
getProviders in interface InstrumentationManager
Returns:
all providers managed by this manager

start

public void start(InstrumentationLevel level,
                  Object context)
Starts all providers at a specific level and context

Specified by:
start in interface InstrumentationManager
Parameters:
level - instrumentation level
context - instrumentation context (broker, factory, config,...)

stop

public void stop(InstrumentationLevel level,
                 Object context)
Stops all providers at a specific level and context

Specified by:
stop in interface InstrumentationManager
context - instrumentation context (broker, factory, config,...)

close

public void close()
           throws Exception
Stops all providers

Specified by:
close in interface Closeable
Throws:
Exception


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.