Top Description Methods
org.glassfish.pfl.tf.spi

public Interface MethodMonitorFactory

Known Direct Implementers
org.glassfish.pfl.tf.spi.MethodMonitorFactoryBase
Imports
java.util.Collection

Since each MethodMonitor generally needs a reference to the class it is monitoring, we actually work with MethodMonitorFactory instances instead of simply using MethodMonitor.
Author
ken

Method Summary

Modifier and TypeMethod and Description
public Collection<MethodMonitorFactory>
contents()

Returns the contents of this method monitor factory.

public MethodMonitor

Returns:

The MethodMonitor for cls.
create
(Class<?>
The class for which we need the MethodMonitor.
cls
)

Return an instance of a MethodMonitor suitable for use in the given class cls, according to the currently registered MethodMonitorFactory instances in the MethodMonitorRegistry.

public String

Returns:

The name of this MethodMonitorFactory.
name
()

The name of this mmf.

Method Detail

contentsback to summary
public Collection<MethodMonitorFactory> contents()

Returns the contents of this method monitor factory. If it is a composite method monitor factory, all the component MethoMonitorFactory instances are returned. If it is a single MethodMonitorFactory, it just returns itself. It is required that the elements of contents are not composite method monitors, i.e. for each mmf in contants(), mmf.contents.size() == 1.

createback to summary
public MethodMonitor create(Class<?> cls)

Return an instance of a MethodMonitor suitable for use in the given class cls, according to the currently registered MethodMonitorFactory instances in the MethodMonitorRegistry.

Parameters
cls:Class<?>

The class for which we need the MethodMonitor.

Returns:MethodMonitor

The MethodMonitor for cls.

nameback to summary
public String name()

The name of this mmf. Given any two mmf a and b, a.equals( b ) iff a.name().equals( b.name() ).

Returns:String

The name of this MethodMonitorFactory.