org.apache.avalon.merlin.impl
Class DefaultKernel

java.lang.Object
  extended byorg.apache.avalon.merlin.impl.DefaultKernel
All Implemented Interfaces:
Disposable, Kernel, KernelController

public class DefaultKernel
extends Object
implements Kernel, Disposable

Implementation of the default Merlin Kernel.

Version:
$Revision: 1.12 $ $Date: 2004/03/17 10:50:04 $
Author:
Avalon Development Team

Field Summary
 
Fields inherited from interface org.apache.avalon.merlin.Kernel
ASSEMBLY, DECOMMISSIONING, DEPLOYMENT, DISSASSEMBLY, INITIALIZED, INITIALIZING, STARTED, STARTING, STOPPED, STOPPING
 
Constructor Summary
DefaultKernel(KernelContext context)
          Creation of a new Merlin Kernel.
 
Method Summary
 void addKernelEventListener(KernelEventListener listener)
          Add a kernel listener.
 void dispose()
           
 ContainmentModel getModel()
          Return the root application block.
 int getState()
          Return the current state of the kernel.
 DeploymentModel locate(String path)
          Return a model matching the supplied path.
 void removeKernelEventListener(KernelEventListener listener)
          Remove a kernel listener.
 void shutdown()
          Shutdown the kernel during which orderly shutdown of all installed blocks is undertaken.
 void startup()
          Initiate the establishment of the root container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultKernel

public DefaultKernel(KernelContext context)
              throws KernelException
Creation of a new Merlin Kernel.

Parameters:
context - the creation context
Throws:
KernelException - if a kernel initialization error occurs
Method Detail

getState

public int getState()
Return the current state of the kernel.

Specified by:
getState in interface Kernel
Returns:
the kernel state

addKernelEventListener

public void addKernelEventListener(KernelEventListener listener)
Add a kernel listener.

Specified by:
addKernelEventListener in interface Kernel
Parameters:
listener - the kernel listener to be added

removeKernelEventListener

public void removeKernelEventListener(KernelEventListener listener)
Remove a kernel listener.

Specified by:
removeKernelEventListener in interface Kernel
Parameters:
listener - the kernel listener to be removed

locate

public DeploymentModel locate(String path)
Return a model matching the supplied path.

Specified by:
locate in interface Kernel
Returns:
the model

getModel

public ContainmentModel getModel()
Return the root application block.

Specified by:
getModel in interface Kernel
Returns:
the application containment block

startup

public void startup()
             throws Exception
Initiate the establishment of the root container.

Specified by:
startup in interface KernelController
Throws:
Exception - if a startup error occurs

shutdown

public void shutdown()
Shutdown the kernel during which orderly shutdown of all installed blocks is undertaken.

Specified by:
shutdown in interface KernelController

dispose

public void dispose()
Specified by:
dispose in interface Disposable


Copyright © The Apache Software Foundation. All Rights Reserved.