|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Kernel
Field Summary | |
---|---|
static ObjectName |
KERNEL
The JMX name used by a Kernel to register itself when it boots. |
static AbstractName |
KERNEL_NAME
|
Method Summary | |
---|---|
void |
boot()
Brings the kernel online |
AbstractName |
getAbstractNameFor(Object service)
Assuming the argument represents a service running in the kernel, returns an AbstractName for it. |
Object |
getAttribute(AbstractName name,
String attributeName)
Gets the value of an attribute on the specified gbean |
Object |
getAttribute(Class type,
String attributeName)
|
Object |
getAttribute(ObjectName name,
String attributeName)
Deprecated. Use AbstractName version instead |
Object |
getAttribute(String shortName,
Class type,
String attributeName)
|
Object |
getAttribute(String shortName,
String attributeName)
|
Date |
getBootTime()
Returns the time this kernel was last booted. |
ClassLoader |
getClassLoaderFor(AbstractName name)
Gets the ClassLoader used to register the specified GBean |
ClassLoader |
getClassLoaderFor(Class type)
|
ClassLoader |
getClassLoaderFor(String shortName)
|
ClassLoader |
getClassLoaderFor(String shortName,
Class type)
|
DependencyManager |
getDependencyManager()
Gets the dependency manager kernel service |
Object |
getGBean(AbstractName name)
Gets the specified GBean instance. |
Object |
getGBean(Class type)
|
Object |
getGBean(ObjectName name)
Deprecated. Use AbstractName version instead |
Object |
getGBean(String shortName)
|
Object |
getGBean(String shortName,
Class type)
|
GBeanData |
getGBeanData(AbstractName name)
Return the GBeanData for a GBean instance. |
GBeanData |
getGBeanData(Class type)
|
GBeanData |
getGBeanData(String shortName)
|
GBeanData |
getGBeanData(String shortName,
Class type)
|
GBeanInfo |
getGBeanInfo(AbstractName name)
Return the GBeanInfo for a registered GBean instance. |
GBeanInfo |
getGBeanInfo(Class type)
|
GBeanInfo |
getGBeanInfo(ObjectName name)
Deprecated. Use AbstractName version instead |
GBeanInfo |
getGBeanInfo(String shortName)
|
GBeanInfo |
getGBeanInfo(String shortName,
Class type)
|
long |
getGBeanStartTime(AbstractName name)
Gets the time the specified GBean was started |
long |
getGBeanStartTime(Class type)
|
long |
getGBeanStartTime(String shortName)
|
long |
getGBeanStartTime(String shortName,
Class type)
|
int |
getGBeanState(AbstractName name)
Gets the state of the specified GBean. |
int |
getGBeanState(Class type)
|
int |
getGBeanState(ObjectName name)
Deprecated. Use AbstractName version instead |
int |
getGBeanState(String shortName)
|
int |
getGBeanState(String shortName,
Class type)
|
String |
getKernelName()
Get the name of this kernel |
LifecycleMonitor |
getLifecycleMonitor()
Gets the lifecycle monitor kernel service |
Naming |
getNaming()
Gets the naming system used by this kernel. |
ProxyManager |
getProxyManager()
Gets the proxy manager kernel service |
String |
getShortNameFor(Object service)
Assuming the argument represents a service running in the kernel, returns the short name of the service. |
String |
getStateReason(AbstractName abstractName)
|
Object |
invoke(AbstractName name,
String methodName)
Invokes a no-argument method on the specified GBean |
Object |
invoke(AbstractName name,
String methodName,
Object[] args,
String[] types)
Invokes a method on the specified GBean with the specified arguments |
Object |
invoke(Class type,
String methodName)
|
Object |
invoke(Class type,
String methodName,
Object[] args,
String[] types)
|
Object |
invoke(ObjectName name,
String methodName)
Deprecated. Use AbstractName version instead |
Object |
invoke(ObjectName name,
String methodName,
Object[] args,
String[] types)
Deprecated. Use AbstractName version instead |
Object |
invoke(String shortName,
Class type,
String methodName)
|
Object |
invoke(String shortName,
Class type,
String methodName,
Object[] args,
String[] types)
|
Object |
invoke(String shortName,
String methodName)
|
Object |
invoke(String shortName,
String methodName,
Object[] args,
String[] types)
|
boolean |
isLoaded(AbstractName name)
Is there a GBean registered with the kernel under the specified name? |
boolean |
isLoaded(Class type)
|
boolean |
isLoaded(String shortName)
|
boolean |
isLoaded(String shortName,
Class type)
|
boolean |
isRunning()
Has the kernel been booted |
boolean |
isRunning(AbstractName name)
Is there a GBean registered with the kernel under the specified name and is it running? |
boolean |
isRunning(Class type)
|
boolean |
isRunning(String shortName)
|
boolean |
isRunning(String shortName,
Class type)
|
Set |
listGBeans(AbstractNameQuery abstractNameQuery)
Gets the AbstractNames of all GBeans matching the abstractNameQuery. |
Set |
listGBeans(ObjectName pattern)
Deprecated. Use AbstractNameQuery version instead |
Set |
listGBeans(Set abstractNameQueries)
Returns a Set of all GBeans matching the set of object name pattern |
void |
loadGBean(GBeanData gbeanData,
ClassLoader classLoader)
Load a specific GBean into this kernel. |
void |
registerShutdownHook(Runnable hook)
Registers a runnable to execute when the kernel is shutdown |
void |
setAttribute(AbstractName name,
String attributeName,
Object attributeValue)
Sets the value of an attribute on the specified gbean |
void |
setAttribute(Class type,
String attributeName,
Object attributeValue)
|
void |
setAttribute(String shortName,
Class type,
String attributeName,
Object attributeValue)
|
void |
setAttribute(String shortName,
String attributeName,
Object attributeValue)
|
void |
shutdown()
Stops the kernel |
void |
startGBean(AbstractName name)
Start a specific GBean. |
void |
startGBean(Class type)
|
void |
startGBean(String shortName)
|
void |
startGBean(String shortName,
Class type)
|
void |
startRecursiveGBean(AbstractName name)
Start a specific GBean and its children. |
void |
startRecursiveGBean(Class type)
|
void |
startRecursiveGBean(String shortName)
|
void |
startRecursiveGBean(String shortName,
Class type)
|
void |
stopGBean(AbstractName name)
Stop a specific GBean. |
void |
stopGBean(Class type)
|
void |
stopGBean(String shortName)
|
void |
stopGBean(String shortName,
Class type)
|
void |
unloadGBean(AbstractName name)
Unload a specific GBean. |
void |
unloadGBean(Class type)
|
void |
unloadGBean(String shortName)
|
void |
unloadGBean(String shortName,
Class type)
|
void |
unregisterShutdownHook(Runnable hook)
Unregisters a runnable from the list to execute when the kernel is shutdown |
Field Detail |
---|
static final ObjectName KERNEL
static final AbstractName KERNEL_NAME
Method Detail |
---|
String getKernelName()
Naming getNaming()
DependencyManager getDependencyManager()
LifecycleMonitor getLifecycleMonitor()
ProxyManager getProxyManager()
void loadGBean(GBeanData gbeanData, ClassLoader classLoader) throws GBeanAlreadyExistsException, InternalKernelException
gbeanData
- the GBean to loadclassLoader
- the class loader to use to load the gbean
GBeanAlreadyExistsException
- if the name is already used
InternalKernelException
- if there is a problem during registrationboolean isLoaded(AbstractName name)
name
- the name to check
boolean isLoaded(String shortName)
boolean isLoaded(Class type)
boolean isLoaded(String shortName, Class type)
Object getGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
name
- the GBean instance to get
GBeanNotFoundException
- if the GBean could not be found
InternalKernelException
- if there is a general error
IllegalStateException
- If the gbean is disabledObject getGBean(String shortName) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
GBeanNotFoundException
InternalKernelException
IllegalStateException
Object getGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
GBeanNotFoundException
InternalKernelException
IllegalStateException
Object getGBean(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
GBeanNotFoundException
InternalKernelException
IllegalStateException
void startGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
name
- the GBean to start
GBeanNotFoundException
- if the GBean could not be found
InternalKernelException
- if there GBean is not state manageable or if there is a general error
IllegalStateException
- If the gbean is disabledvoid startGBean(String shortName) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
GBeanNotFoundException
InternalKernelException
IllegalStateException
void startGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
GBeanNotFoundException
InternalKernelException
IllegalStateException
void startGBean(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
GBeanNotFoundException
InternalKernelException
IllegalStateException
void startRecursiveGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
name
- the GBean to start
GBeanNotFoundException
- if the GBean could not be found
InternalKernelException
- if there GBean is not state manageable or if there is a general error
IllegalStateException
- If the gbean is disabledvoid startRecursiveGBean(String shortName) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
GBeanNotFoundException
InternalKernelException
IllegalStateException
void startRecursiveGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
GBeanNotFoundException
InternalKernelException
IllegalStateException
void startRecursiveGBean(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
GBeanNotFoundException
InternalKernelException
IllegalStateException
boolean isRunning(AbstractName name)
name
- the name to check
boolean isRunning(String shortName)
boolean isRunning(Class type)
boolean isRunning(String shortName, Class type)
void stopGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
name
- the GBean to stop
GBeanNotFoundException
- if the GBean could not be found
InternalKernelException
- if there GBean is not state manageable or if there is a general error
IllegalStateException
- If the gbean is disabledvoid stopGBean(String shortName) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
GBeanNotFoundException
InternalKernelException
IllegalStateException
void stopGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
GBeanNotFoundException
InternalKernelException
IllegalStateException
void stopGBean(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
GBeanNotFoundException
InternalKernelException
IllegalStateException
void unloadGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
name
- the name of the GBean to unregister
GBeanNotFoundException
- if the GBean could not be found
InternalKernelException
- if there GBean is a problem while unloading the GBean
IllegalStateException
void unloadGBean(String shortName) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
GBeanNotFoundException
InternalKernelException
IllegalStateException
void unloadGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
GBeanNotFoundException
InternalKernelException
IllegalStateException
void unloadGBean(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
GBeanNotFoundException
InternalKernelException
IllegalStateException
int getGBeanState(AbstractName name) throws GBeanNotFoundException
name
- the name of the GBean
GBeanNotFoundException
- if the GBean could not be foundint getGBeanState(String shortName) throws GBeanNotFoundException
GBeanNotFoundException
int getGBeanState(Class type) throws GBeanNotFoundException
GBeanNotFoundException
int getGBeanState(String shortName, Class type) throws GBeanNotFoundException
GBeanNotFoundException
long getGBeanStartTime(AbstractName name) throws GBeanNotFoundException
name
- the name of the GBean
GBeanNotFoundException
- if the GBean could not be foundlong getGBeanStartTime(String shortName) throws GBeanNotFoundException
GBeanNotFoundException
long getGBeanStartTime(Class type) throws GBeanNotFoundException
GBeanNotFoundException
long getGBeanStartTime(String shortName, Class type) throws GBeanNotFoundException
GBeanNotFoundException
ClassLoader getClassLoaderFor(AbstractName name) throws GBeanNotFoundException
name
- the name of the gbean from which the class loader should be extracted
GBeanNotFoundException
- if the specified GBean is not registered with the kernelClassLoader getClassLoaderFor(String shortName) throws GBeanNotFoundException
GBeanNotFoundException
ClassLoader getClassLoaderFor(Class type) throws GBeanNotFoundException
GBeanNotFoundException
ClassLoader getClassLoaderFor(String shortName, Class type) throws GBeanNotFoundException
GBeanNotFoundException
GBeanInfo getGBeanInfo(AbstractName name) throws GBeanNotFoundException
name
- the name of the GBean whose info should be returned
GBeanNotFoundException
- if there is no instance with the supplied nameGBeanInfo getGBeanInfo(String shortName) throws GBeanNotFoundException
GBeanNotFoundException
GBeanInfo getGBeanInfo(Class type) throws GBeanNotFoundException
GBeanNotFoundException
GBeanInfo getGBeanInfo(String shortName, Class type) throws GBeanNotFoundException
GBeanNotFoundException
GBeanData getGBeanData(AbstractName name) throws GBeanNotFoundException, InternalKernelException
name
- the name of the GBean whose info should be returned
GBeanNotFoundException
- if there is no instance with the supplied name
InternalKernelException
GBeanData getGBeanData(String shortName) throws GBeanNotFoundException, InternalKernelException
GBeanNotFoundException
InternalKernelException
GBeanData getGBeanData(Class type) throws GBeanNotFoundException, InternalKernelException
GBeanNotFoundException
InternalKernelException
GBeanData getGBeanData(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException
GBeanNotFoundException
InternalKernelException
Set listGBeans(AbstractNameQuery abstractNameQuery)
abstractNameQuery
- the query to execute
Set listGBeans(Set abstractNameQueries)
abstractNameQueries
- the queries to execute
Object getAttribute(AbstractName name, String attributeName) throws GBeanNotFoundException, NoSuchAttributeException, Exception
name
- the name of the gbean from which the attribute will be retrievedattributeName
- the name of the attribute to fetch
GBeanNotFoundException
- if there is not a gbean under the specified name
NoSuchAttributeException
- if the gbean does not contain the specified attribute
Exception
- if the gbean throws an exception from the getterObject getAttribute(String shortName, String attributeName) throws GBeanNotFoundException, NoSuchAttributeException, Exception
GBeanNotFoundException
NoSuchAttributeException
Exception
Object getAttribute(Class type, String attributeName) throws GBeanNotFoundException, NoSuchAttributeException, Exception
GBeanNotFoundException
NoSuchAttributeException
Exception
Object getAttribute(String shortName, Class type, String attributeName) throws GBeanNotFoundException, NoSuchAttributeException, Exception
GBeanNotFoundException
NoSuchAttributeException
Exception
void setAttribute(AbstractName name, String attributeName, Object attributeValue) throws GBeanNotFoundException, NoSuchAttributeException, Exception
name
- the name of the gbean from in which the new attribute value will be setattributeName
- the name of the attribute to setattributeValue
- the new value of the attribute
GBeanNotFoundException
- if there is not a gbean under the specified name
NoSuchAttributeException
- if the gbean does not contain the specified attribute
Exception
- if the gbean throws an exception from the settervoid setAttribute(String shortName, String attributeName, Object attributeValue) throws GBeanNotFoundException, NoSuchAttributeException, Exception
GBeanNotFoundException
NoSuchAttributeException
Exception
void setAttribute(Class type, String attributeName, Object attributeValue) throws GBeanNotFoundException, NoSuchAttributeException, Exception
GBeanNotFoundException
NoSuchAttributeException
Exception
void setAttribute(String shortName, Class type, String attributeName, Object attributeValue) throws GBeanNotFoundException, NoSuchAttributeException, Exception
GBeanNotFoundException
NoSuchAttributeException
Exception
Object invoke(AbstractName name, String methodName) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception
name
- the name of the gbean from in which the new attribute value will be setmethodName
- the name of the method to invoke
GBeanNotFoundException
- if there is not a gbean under the specified name
NoSuchOperationException
- if the gbean does not have the specified operation
InternalKernelException
- if an error occurs within the kernel itself
Exception
- if the method throws an exceptionObject invoke(String shortName, String methodName) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception
GBeanNotFoundException
NoSuchOperationException
InternalKernelException
Exception
Object invoke(Class type, String methodName) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception
GBeanNotFoundException
NoSuchOperationException
InternalKernelException
Exception
Object invoke(String shortName, Class type, String methodName) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception
GBeanNotFoundException
NoSuchOperationException
InternalKernelException
Exception
Object invoke(AbstractName name, String methodName, Object[] args, String[] types) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception
name
- the name of the gbean from in which the new attribute value will be setmethodName
- the name of the method to invokeargs
- the arguments to pass to the methodtypes
- the types of the arguments; the types are used to determine the signature of the mehod that should be invoked
GBeanNotFoundException
- if there is not a gbean under the specified name
NoSuchOperationException
- if the gbean does not have the specified operation
InternalKernelException
- if an error occurs within the kernel itself
Exception
- if the method throws an exceptionObject invoke(String shortName, String methodName, Object[] args, String[] types) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception
GBeanNotFoundException
NoSuchOperationException
InternalKernelException
Exception
Object invoke(Class type, String methodName, Object[] args, String[] types) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception
GBeanNotFoundException
NoSuchOperationException
InternalKernelException
Exception
Object invoke(String shortName, Class type, String methodName, Object[] args, String[] types) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception
GBeanNotFoundException
NoSuchOperationException
InternalKernelException
Exception
AbstractName getAbstractNameFor(Object service)
String getShortNameFor(Object service)
void boot() throws Exception
Exception
- if the kernel can not bootDate getBootTime()
void registerShutdownHook(Runnable hook)
hook
- a runnable to execute when the kernel is shutdownvoid unregisterShutdownHook(Runnable hook)
hook
- the runnable that should be removedvoid shutdown()
boolean isRunning()
Object getGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException
GBeanNotFoundException
InternalKernelException
IllegalStateException
int getGBeanState(ObjectName name) throws GBeanNotFoundException
GBeanNotFoundException
GBeanInfo getGBeanInfo(ObjectName name) throws GBeanNotFoundException
GBeanNotFoundException
Set listGBeans(ObjectName pattern)
Object getAttribute(ObjectName name, String attributeName) throws GBeanNotFoundException, NoSuchAttributeException, Exception
GBeanNotFoundException
NoSuchAttributeException
Exception
Object invoke(ObjectName name, String methodName) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception
GBeanNotFoundException
NoSuchOperationException
InternalKernelException
Exception
Object invoke(ObjectName name, String methodName, Object[] args, String[] types) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception
GBeanNotFoundException
NoSuchOperationException
InternalKernelException
Exception
String getStateReason(AbstractName abstractName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |