org.glassfish.pfl.tf.spi
Interface MethodMonitorFactory

All Known Implementing Classes:
MethodMonitorBase.MethodMonitorFactorySelfImpl, MethodMonitorFactoryBase

public interface MethodMonitorFactory

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
 Collection<MethodMonitorFactory> contents()
          Returns the contents of this method monitor factory.
 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.
 String name()
          The name of this mmf.
 

Method Detail

create

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 - The class for which we need the MethodMonitor.
Returns:
The MethodMonitor for cls.

contents

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.


name

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

Returns:
The name of this MethodMonitorFactory.


Copyright © 2013 Oracle. All Rights Reserved.