Package org.exoplatform.management.spi
Interface ManagedResource
-
- All Superinterfaces:
ManagementContext
- All Known Implementing Classes:
ManagementContextImpl
public interface ManagedResource extends ManagementContext
The managed resource provided by the kernel to a management provider. It gives access to the resource itself, the meta data of the managed resource, the attached scoped data and the before/after invoke contract when a resource is invoked from the management layer.- Version:
- $Revision$
- Author:
- Julien Viet
-
-
Method Summary
All Methods Instance Methods Abstract 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.ManagedTypeMetaDatagetMetaData()Returns the resource meta data.ObjectgetResource()The resource implementation.<S> List<S>getScopingData(Class<S> scopeType)Returns the scoping data of the context.<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.-
Methods inherited from interface org.exoplatform.management.ManagementContext
register, unregister
-
-
-
-
Method Detail
-
getResource
Object getResource()
The resource implementation.- Returns:
- the resource
-
getMetaData
ManagedTypeMetaData getMetaData()
Returns the resource meta data.- Returns:
- the meta data
-
getScopingData
<S> List<S> getScopingData(Class<S> scopeType)
Returns the scoping data of the context. The list contains the scoping properties registered by the provider if a call has been made to thesetScopingData(Class, Object)method plus the scoping properties of the parent context.- Type Parameters:
S- the generic type of the scope type- Parameters:
scopeType- the scope type- Returns:
- the scoping properties
-
setScopingData
<S> void setScopingData(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.- Type Parameters:
S- the generic type of the scope type- Parameters:
scopeType- the scope typescopingData- the scoping data
-
beforeInvoke
void beforeInvoke(Object managedResource)
Before a managed resource is invoked by the management layer.- Parameters:
managedResource- the managed resource
-
afterInvoke
void afterInvoke(Object managedResource)
After a managed resource is invoked by the management layer.- Parameters:
managedResource- the managed resource
-
-