|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPdsKernel
An interface to access the pds kernel library. This interface provides access to various pds kernel functions. It may be used to utilize the kernel. But only allowed modules may access the kernel. See the ptb configuration file for details.
Nested Class Summary | |
---|---|
static class |
IPdsKernel.KernelStateType
Kernel state types |
static class |
IPdsKernel.KernelVersionType
Kernel version types |
Method Summary | |
---|---|
IPdsAppKernelAppContext |
getAppKernelAppContext()
Returns the app kernel app context |
String |
getApplicationProperty(String key)
Returns value of an application property |
String |
getApplicationProperty(String key,
String defaultValue)
Returns value of an application property |
IPdsClassLoaderExtension[] |
getClassLoaderExtensions()
Returns a list of all available kernel class loader extensions. |
Object |
getComponentRegistry()
Returns the kernel component registry for the running application |
Object |
getKernelCore()
Returns the kernel core |
IPdsKernelListener[] |
getKernelListeners()
Returns a list of all available kernel listeners. |
IPdsKernel.KernelStateType |
getKernelState()
Returns the kernel state |
IPdsKernel.KernelVersionType |
getKernelVersion()
Returns the version of this kernel |
IPdsPropertyParser[] |
getPropertyParsers()
Returns a list of all available property parsers. |
void |
installAppKernelAppContext(IPdsAppKernelAppContext context)
Installs a new app kernel app context |
void |
installClassLoaderExtension(IPdsClassLoaderExtension extension)
Installs a new kernel class loader extension |
void |
installKernelListener(IPdsKernelListener listener)
Installs a new kernel listener |
void |
installPropertyParser(IPdsPropertyParser parser)
Installs a new property parser to manipulate the properties |
void |
joinState(IPdsKernel.KernelStateType state,
long timeout)
Joins the kernel state and waits till the kernel reaches the given state. |
void |
shutdown()
Tries to shutdown the kernel. |
void |
shutdown(boolean shutdownVm)
Tries to shutdown the kernel. |
Method Detail |
---|
IPdsKernel.KernelVersionType getKernelVersion()
IPdsKernel.KernelStateType getKernelState()
void joinState(IPdsKernel.KernelStateType state, long timeout)
state
- The state to be reachedtimeout
- Milliseconds/timeout (greater than 0)
IllegalStateException
- thrown if the kernel does not reach the state or the timeout is reached.void shutdown()
SecurityException
- thrown if the caller is not allowed to shutdown the kernel instance.
IllegalStateException
- thrown if the kernel is not running.void shutdown(boolean shutdownVm)
shutdownVm
- true
if the vm should be shut down and false
if this method dhould return without shutting down the vm.
SecurityException
- thrown if the caller is not allowed to shutdown the kernel instance.
IllegalStateException
- thrown if the kernel is not running.void installKernelListener(IPdsKernelListener listener)
listener
- Kernel listener.
SecurityException
- thrown if the caller is not allowed to install a new kernel listener.
IllegalStateException
- thrown if we are in illegal state. The only way to install a kernel listener is method IPdsKernelProvider.onPreStartup(IPdsKernel)
.
Whenever this method is called when the kernel is already running, this exception will be thrown.void installAppKernelAppContext(IPdsAppKernelAppContext context)
context
- the app kernel app context
SecurityException
- thrown if the caller is not allowed to install a new app kernel app context.
IllegalStateException
- thrown if we are in illegal state. The only way to install a app kernel app context is method
IPdsKernelProvider.onPreStartup(IPdsKernel)
. Whenever this method is called when the kernel is already running, this exception will
be thrown. Thrown if this method is called twice.IPdsAppKernelAppContext getAppKernelAppContext()
SecurityException
- thrown if the caller is not allowed to receive the app kernel app context.IPdsKernelListener[] getKernelListeners()
SecurityException
- thrown if the caller is not allowed to receive the listeners list.void installClassLoaderExtension(IPdsClassLoaderExtension extension)
extension
- Kernel class loader extension
SecurityException
- thrown if the caller is not allowed to install a new kernel class loader extension.
IllegalStateException
- thrown if we are in illegal state. The only way to install a kernel class loader extension is method
IPdsKernelProvider.onPreStartup(IPdsKernel)
. Whenever this method is called when the kernel is already running, this exception will
be thrown.IPdsClassLoaderExtension[] getClassLoaderExtensions()
SecurityException
- thrown if the caller is not allowed to receive the class loader extensions.void installPropertyParser(IPdsPropertyParser parser)
parser
- Property parser
SecurityException
- thrown if the caller is not allowed to install a new property parser.
IllegalStateException
- thrown if we are in illegal state. The only way to install a property parser is method IPdsKernelProvider.onPreStartup(IPdsKernel)
.
Whenever this method is called when the kernel is already running, this exception will be thrown.IPdsPropertyParser[] getPropertyParsers()
SecurityException
- thrown if the caller is not allowed to receive the property parsers.Object getKernelCore()
com.sun.sgs.impl.kernel.Kernel
inside the applications context. You may try to access the
kernel by reflection because this class is only package visible.
SecurityException
- thrown if the caller is not allowed to receive the kernel instance.
IllegalStateException
- thrown if we are in illegal state. If the kernel is not running, an exception is thrown.Object getComponentRegistry()
com.sun.sgs.kernel.ComponentRegistry
inside the applications context.
SecurityException
- thrown if the caller is not allowed to receive the component registry.
IllegalStateException
- thrown if we are in illegal state. If the kernel is not running, an exception is thrown.String getApplicationProperty(String key)
key
-
null
if this property is not present.String getApplicationProperty(String key, String defaultValue)
key
- defaultValue
-
defaultValue
if this property is not present.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |