org.ehcache.management
Interface ManagementRegistry

All Superinterfaces:
Service
All Known Implementing Classes:
AbstractManagementRegistry, DefaultManagementRegistry

public interface ManagementRegistry
extends Service

Repository of objects exposing capabilities via the management and monitoring facilities.


Method Summary
<T> T
callAction(java.util.Map<java.lang.String,java.lang.String> context, java.lang.String capabilityName, java.lang.String methodName, java.lang.String[] argClassNames, java.lang.Object[] args)
          Call an action of a managed object's capability.
<T> java.util.Collection<T>
capabilities()
          Get the management capabilities of the registered objects.
<T> java.util.Collection<T>
collectStatistics(java.util.Map<java.lang.String,java.lang.String> context, java.lang.String capabilityName, java.lang.String... statisticNames)
          Collect statistics from a managed object's capability.
<T> java.util.Collection<T>
contexts()
          Get the management contexts required to make use of the registered objects' capabilities.
<T> void
register(java.lang.Class<T> managedType, T managedObject)
          Register an object in the management registry.
<T> void
unregister(java.lang.Class<T> managedType, T managedObject)
          Unregister an object from the management registry.
 
Methods inherited from interface org.ehcache.spi.service.Service
start, stop
 

Method Detail

register

<T> void register(java.lang.Class<T> managedType,
                  T managedObject)
Register an object in the management registry.

Type Parameters:
T - the type.
Parameters:
managedType - the managed object's class.
managedObject - the managed object.

unregister

<T> void unregister(java.lang.Class<T> managedType,
                    T managedObject)
Unregister an object from the management registry.

Type Parameters:
T - the type.
Parameters:
managedType - the managed object's class.
managedObject - the managed object.

capabilities

<T> java.util.Collection<T> capabilities()
Get the management capabilities of the registered objects.

Type Parameters:
T - the capability type.
Returns:
a collection of capabilities.

contexts

<T> java.util.Collection<T> contexts()
Get the management contexts required to make use of the registered objects' capabilities.

Type Parameters:
T - the context type.
Returns:
a collection of contexts.

collectStatistics

<T> java.util.Collection<T> collectStatistics(java.util.Map<java.lang.String,java.lang.String> context,
                                              java.lang.String capabilityName,
                                              java.lang.String... statisticNames)
Collect statistics from a managed object's capability.

Type Parameters:
T - the statistics' type.
Parameters:
context - the capability's context.
capabilityName - the capability name.
statisticNames - the statistic names.
Returns:
a collection of statistics.

callAction

<T> T callAction(java.util.Map<java.lang.String,java.lang.String> context,
                 java.lang.String capabilityName,
                 java.lang.String methodName,
                 java.lang.String[] argClassNames,
                 java.lang.Object[] args)
Call an action of a managed object's capability.

Type Parameters:
T - the returned type.
Parameters:
context - the capability's context.
capabilityName - the capability name.
methodName - the action's method name.
argClassNames - the action method's argument class names.
args - the action method's arguments.
Returns:
the action method's return value.