org.ehcache.management.providers
Interface ManagementProvider<T>

All Known Implementing Classes:
AbstractActionProvider, CapabilityContextProvider, EhcacheActionProvider, EhcacheStatisticsProvider

public interface ManagementProvider<T>

Interface to a provider of management capabilities for certain object class.


Method Summary
 java.lang.Object callAction(java.util.Map<java.lang.String,java.lang.String> context, java.lang.String methodName, java.lang.String[] argClassNames, java.lang.Object[] args)
          Call an action, if the provider supports this.
 org.terracotta.management.capabilities.context.CapabilityContext capabilityContext()
          Get the context that the provided capabilities need to run.
 java.util.Collection<org.terracotta.management.stats.Statistic<?>> collectStatistics(java.util.Map<java.lang.String,java.lang.String> context, java.lang.String[] statisticNames)
          Collect statistics, if the provider supports this.
 java.util.Set<org.terracotta.management.capabilities.descriptors.Descriptor> descriptions()
          Get the set of capability descriptors the current provider provides.
 java.lang.Class<T> managedType()
          The class of managed objects.
 void register(T managedObject)
          Register an object for management in the current provider.
 void unregister(T managedObject)
          Unregister a managed object from the current provider.
 

Method Detail

managedType

java.lang.Class<T> managedType()
The class of managed objects.

Returns:
a class.

register

void register(T managedObject)
Register an object for management in the current provider.

Parameters:
managedObject - the object to manage.

unregister

void unregister(T managedObject)
Unregister a managed object from the current provider.

Parameters:
managedObject - the managed object.

descriptions

java.util.Set<org.terracotta.management.capabilities.descriptors.Descriptor> descriptions()
Get the set of capability descriptors the current provider provides.

Returns:
the set of capability descriptors.

capabilityContext

org.terracotta.management.capabilities.context.CapabilityContext capabilityContext()
Get the context that the provided capabilities need to run.

Returns:
the context requirements.

collectStatistics

java.util.Collection<org.terracotta.management.stats.Statistic<?>> collectStatistics(java.util.Map<java.lang.String,java.lang.String> context,
                                                                                     java.lang.String[] statisticNames)
Collect statistics, if the provider supports this.

Parameters:
context - the context.
statisticNames - the statistic names to collect.
Returns:
the statistic values.

callAction

java.lang.Object callAction(java.util.Map<java.lang.String,java.lang.String> context,
                            java.lang.String methodName,
                            java.lang.String[] argClassNames,
                            java.lang.Object[] args)
Call an action, if the provider supports this.

Parameters:
context - the context.
methodName - the method name.
argClassNames - the class names of the method arguments.
args - the method arguments.
Returns:
the action's return value.