com.gridsystems.innergrid.kernel
Class Kernel

java.lang.Object
  extended by com.gridsystems.innergrid.kernel.Kernel
Direct Known Subclasses:
KernelCtxListener, KernelInitializer, KernelLauncher, KernelNotifier

public class Kernel
extends java.lang.Object

Kernel integration provider. Methods in this class give centralized access to a variety of extensibility points.

As most of this class fields are declared protected, and no setter methods are provided from them, their initialization must be performed from a subclass.

Version:
1.0
Author:
Rodrigo Ruiz, Xmas

Field Summary
protected static AAService aas
          Reference to the default AAService instance.
protected static PluginVersion kernelVersion
          Kernel Version Info.
protected static javax.swing.event.EventListenerList listenerList
          Container for the list of registered KernelListeners.
protected static PluginManager manager
          Reference to the PluginManager instance.
protected static ApiRegistry registry
          Reference to the ApiRegistry instance.
protected static java.util.Timer timer
          Timer instance for global task scheduling.
 
Constructor Summary
protected Kernel()
          This class MUST not be instantiated, but subclasses may be.
 
Method Summary
static void addKernelListener(KernelListener l)
          Registers a kernel listener for receiving notification on kernel events.
static int addPreWSSFilter(RequestFilter requestFilter, int position)
          Adds a filter at the specified position.
protected static void clearListeners()
          Clears the listener list.
static ApiRegistry getApiRegistry()
          Gets a unique instance of ApiRegistry.
static AAService getDefaultAAS()
          Gets the current Authenticator implementation.
static PluginManager getPluginManager()
          Gets a unique instance of PluginManager.
static java.util.Timer getTimer()
          Gets a global timer for scheduled task execution.
static PluginVersion getVersion()
          Gets the version of the kernel engine.
protected static void notifyShutdown(javax.servlet.ServletContext ctx)
          Sends a "Shutdown event" notification to all registered listeners.
protected static void notifyStartup(javax.servlet.ServletContext ctx)
          Sends a "Startup event" notification to all registered listeners.
static void removeKernelListener(KernelListener l)
          Unregisters a kernel listener.
static boolean removePreWSSFilter(RequestFilter requestFilter)
          Removes a filter.
protected static PluginVersion retrieveKernelVersion()
          Gets the kernel version from the VERSION_PROPERTIES_RSC resource.
static void setDefaultAAS(AAService a)
          Sets the current Authenticator implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kernelVersion

protected static PluginVersion kernelVersion
Kernel Version Info.


registry

protected static ApiRegistry registry
Reference to the ApiRegistry instance.


manager

protected static PluginManager manager
Reference to the PluginManager instance.


aas

protected static AAService aas
Reference to the default AAService instance.


timer

protected static java.util.Timer timer
Timer instance for global task scheduling.


listenerList

protected static javax.swing.event.EventListenerList listenerList
Container for the list of registered KernelListeners.

See Also:
KernelListener
Constructor Detail

Kernel

protected Kernel()
This class MUST not be instantiated, but subclasses may be.

Method Detail

getApiRegistry

public static ApiRegistry getApiRegistry()
Gets a unique instance of ApiRegistry.

Returns:
the API registry instance

getPluginManager

public static PluginManager getPluginManager()
Gets a unique instance of PluginManager.

Returns:
The Plugin Manager instance

getTimer

public static java.util.Timer getTimer()
Gets a global timer for scheduled task execution.

Returns:
The Kernel global timer instance

getDefaultAAS

public static AAService getDefaultAAS()
Gets the current Authenticator implementation.

Returns:
Gets the system default authenticator

setDefaultAAS

public static void setDefaultAAS(AAService a)
Sets the current Authenticator implementation.

Parameters:
a - The new Authenticator instance

getVersion

public static PluginVersion getVersion()
Gets the version of the kernel engine. It can be useful in deciding if a plugin compatibility with the base services.

Returns:
The kernel engine version

addKernelListener

public static void addKernelListener(KernelListener l)
Registers a kernel listener for receiving notification on kernel events.

Parameters:
l - The listener instance to register

removeKernelListener

public static void removeKernelListener(KernelListener l)
Unregisters a kernel listener.

Parameters:
l - The listener instance to unregister

notifyStartup

protected static void notifyStartup(javax.servlet.ServletContext ctx)
Sends a "Startup event" notification to all registered listeners.

Parameters:
ctx - The context in which the event has been fired

notifyShutdown

protected static void notifyShutdown(javax.servlet.ServletContext ctx)
Sends a "Shutdown event" notification to all registered listeners.

Parameters:
ctx - The context in which the event has been fired

clearListeners

protected static void clearListeners()
Clears the listener list.

This method is for cleanup on context shutdown. It should NEVER be called in any other context, as it would break down kernel functionality.


addPreWSSFilter

public static int addPreWSSFilter(RequestFilter requestFilter,
                                  int position)
Adds a filter at the specified position. Adds a filter at the specified position. The filters in this list will be checked before the authentication data is retrieved from the message, so no username/password will be available when they are executed.

Parameters:
requestFilter - the filter to add.
position - the position at which at the filter. If it is a negative number, the filter will be added at the end of the list.
Returns:
int the position at which the element was added, or -1 if it was not added.

removePreWSSFilter

public static boolean removePreWSSFilter(RequestFilter requestFilter)
Removes a filter. Removes a filter from the list of filters to run before the authentication data is retrieved from the message.

Parameters:
requestFilter - the filter to remove.
Returns:
true if and only if the requested object was removed.

retrieveKernelVersion

protected static PluginVersion retrieveKernelVersion()
Gets the kernel version from the VERSION_PROPERTIES_RSC resource.

Returns:
the PluginVersion of the Kernel. If this method cannot retrieve it due to any reason, the server is shut down.


Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.