Class ManagementContextImpl
- java.lang.Object
-
- org.exoplatform.container.management.ManagementContextImpl
-
- All Implemented Interfaces:
ManagementContext,ManagedResource
public class ManagementContextImpl extends Object implements ManagementContext, ManagedResource
- Version:
- $Revision$
- Author:
- Julien Viet
-
-
Constructor Summary
Constructors Constructor Description ManagementContextImpl(ManageableContainer container)ManagementContextImpl(ManagementContextImpl parent, Object resource, ManagedTypeMetaData typeMD)ManagementContextImpl(ManagementContextImpl parent, ManageableContainer container)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterInvoke(Object managedResource)After a managed resource is invoked by the management layer.voidbeforeInvoke(Object managedResource)Before a managed resource is invoked by the management layer.ManageableContainerfindContainer()ManagedTypeMetaDatagetMetaData()Returns the resource meta data.ManagementContextgetParent()ObjectgetResource()The resource implementation.<S> List<S>getScopingData(Class<S> scopeType)Returns the scoping data of the context.voidregister(Object o)Register an object as a managed object.<S> voidsetScopingData(Class<S> scopeType, S scopingData)Callback made by the provider to the resource to signal that scoping data that is used for the managed resource.StringtoString()voidunregister(Object o)Unregisters an object from its managed life cycle.voidunregisterAll()Unmanages (unregisters) all early registered MBeans in ManagementProviders
-
-
-
Constructor Detail
-
ManagementContextImpl
public ManagementContextImpl(ManageableContainer container)
-
ManagementContextImpl
public ManagementContextImpl(ManagementContextImpl parent, ManageableContainer container)
-
ManagementContextImpl
public ManagementContextImpl(ManagementContextImpl parent, Object resource, ManagedTypeMetaData typeMD)
-
-
Method Detail
-
getParent
public ManagementContext getParent()
-
setScopingData
public <S> void setScopingData(Class<S> scopeType, S scopingData)
Description copied from interface:ManagedResourceCallback made by the provider to the resource to signal that scoping data that is used for the managed resource.- Specified by:
setScopingDatain interfaceManagedResource- Type Parameters:
S- the generic type of the scope type- Parameters:
scopeType- the scope typescopingData- the scoping data
-
register
public void register(Object o)
Description copied from interface:ManagementContextRegister an object as a managed object.- Specified by:
registerin interfaceManagementContext- Parameters:
o- the object to be managed
-
unregister
public void unregister(Object o)
Unregisters an object from its managed life cycle.- Specified by:
unregisterin interfaceManagementContext- Parameters:
o- the object to be unmanaged
-
unregisterAll
public void unregisterAll()
Unmanages (unregisters) all early registered MBeans in ManagementProviders
-
getScopingData
public <S> List<S> getScopingData(Class<S> scopeType)
Description copied from interface:ManagedResourceReturns the scoping data of the context. The list contains the scoping properties registered by the provider if a call has been made to theManagedResource.setScopingData(Class, Object)method plus the scoping properties of the parent context.- Specified by:
getScopingDatain interfaceManagedResource- Type Parameters:
S- the generic type of the scope type- Parameters:
scopeType- the scope type- Returns:
- the scoping properties
-
findContainer
public ManageableContainer findContainer()
-
beforeInvoke
public void beforeInvoke(Object managedResource)
Description copied from interface:ManagedResourceBefore a managed resource is invoked by the management layer.- Specified by:
beforeInvokein interfaceManagedResource- Parameters:
managedResource- the managed resource
-
afterInvoke
public void afterInvoke(Object managedResource)
Description copied from interface:ManagedResourceAfter a managed resource is invoked by the management layer.- Specified by:
afterInvokein interfaceManagedResource- Parameters:
managedResource- the managed resource
-
getResource
public Object getResource()
Description copied from interface:ManagedResourceThe resource implementation.- Specified by:
getResourcein interfaceManagedResource- Returns:
- the resource
-
getMetaData
public ManagedTypeMetaData getMetaData()
Description copied from interface:ManagedResourceReturns the resource meta data.- Specified by:
getMetaDatain interfaceManagedResource- Returns:
- the meta data
-
-