|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terracotta.management.registry.AbstractManagementProvider<T>
public abstract class AbstractManagementProvider<T>
| Field Summary | |
|---|---|
protected Queue<ExposedObject<T>> |
managedObjects
|
| Constructor Summary | |
|---|---|
AbstractManagementProvider(Class<? extends T> managedType)
|
|
| Method Summary | ||
|---|---|---|
protected CapabilityContext |
buildCapabilityContext()
|
|
protected String |
buildCapabilityName()
|
|
|
callAction(Context context,
String methodName,
Class<V> returnType,
Parameter... parameters)
Call an action, if the provider supports this. |
|
void |
callAction(Context context,
String methodName,
Parameter... parameters)
Call an action, if the provider supports this. |
|
void |
close()
Closes the management provider. |
|
Map<String,Statistic<?,?>> |
collectStatistics(Context context,
Collection<String> statisticNames,
long since)
Collect statistics, if the provider supports this. |
|
protected void |
dispose(ExposedObject<T> exposedObject)
|
|
protected ExposedObject<T> |
findExposedObject(Context context)
|
|
CapabilityContext |
getCapabilityContext()
Get the context that the provided capabilities need to run. |
|
String |
getCapabilityName()
|
|
Collection<Descriptor> |
getDescriptors()
Get the set of capability descriptors the current provider provides. |
|
Class<? extends T> |
getManagedType()
The class of managed objects. |
|
void |
register(T managedObject)
Register an object for management in the current provider. |
|
boolean |
supports(Context context)
Check wheter this management provider supports the given context |
|
void |
unregister(T managedObject)
Unregister a managed object from the current provider. |
|
protected abstract ExposedObject<T> |
wrap(T managedObject)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.terracotta.management.registry.ManagementProvider |
|---|
getCapability |
| Field Detail |
|---|
protected final Queue<ExposedObject<T>> managedObjects
| Constructor Detail |
|---|
public AbstractManagementProvider(Class<? extends T> managedType)
| Method Detail |
|---|
public final Class<? extends T> getManagedType()
ManagementProvider
getManagedType in interface ManagementProvider<T>public final String getCapabilityName()
getCapabilityName in interface ManagementProvider<T>public final CapabilityContext getCapabilityContext()
ManagementProvider
getCapabilityContext in interface ManagementProvider<T>public final void register(T managedObject)
ManagementProvider
register in interface ManagementProvider<T>managedObject - the object to manage.public final void unregister(T managedObject)
ManagementProvider
unregister in interface ManagementProvider<T>managedObject - the managed object.public final void close()
ManagementProvider
close in interface ManagementProvider<T>public final boolean supports(Context context)
ManagementProvider
supports in interface ManagementProvider<T>context - The management context
public Map<String,Statistic<?,?>> collectStatistics(Context context,
Collection<String> statisticNames,
long since)
ManagementProvider
collectStatistics in interface ManagementProvider<T>context - the context.statisticNames - the statistic names to collect.since - The unix time in ms from where to return the statistics for statistics based on samples.
public final void callAction(Context context,
String methodName,
Parameter... parameters)
ManagementProvider
callAction in interface ManagementProvider<T>context - the context.methodName - the method name.parameters - the action method's parameters (objects and class names)
public <V> V callAction(Context context,
String methodName,
Class<V> returnType,
Parameter... parameters)
ManagementProvider
callAction in interface ManagementProvider<T>V - the expected response typecontext - the context.methodName - the method name.returnType - The expected return typeparameters - the action method's parameters (objects and class names)
public Collection<Descriptor> getDescriptors()
ManagementProvider
getDescriptors in interface ManagementProvider<T>protected String buildCapabilityName()
protected CapabilityContext buildCapabilityContext()
protected void dispose(ExposedObject<T> exposedObject)
protected abstract ExposedObject<T> wrap(T managedObject)
protected final ExposedObject<T> findExposedObject(Context context)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||