org.mule.registry.impl
Class AbstractUnit

java.lang.Object
  extended byorg.mule.registry.impl.AbstractEntry
      extended byorg.mule.registry.impl.AbstractUnit
All Implemented Interfaces:
Entry, Serializable, Unit

public abstract class AbstractUnit
extends AbstractEntry
implements Unit

Author:
Guillaume Nodet
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mule.registry.impl.AbstractEntry
currentState, installRoot, name, registry, stateAtShutdown
 
Fields inherited from interface org.mule.registry.Entry
INITIALIZED, RUNNING, SHUTDOWN, STOPPED, UNKNOWN
 
Constructor Summary
protected AbstractUnit(Registry registry)
           
 
Method Summary
 String deploy()
           
abstract  String doDeploy()
           
protected abstract  void doInit()
           
protected abstract  void doShutDown()
           
protected abstract  void doStart()
           
protected abstract  void doStop()
           
protected abstract  String doUndeploy()
           
 Assembly getAssembly()
           
 void init()
           
 void setAssembly(Assembly assembly)
           
 void setRegistryComponent(RegistryComponent component)
           
 void shutDown()
          Shut down the item.
 void start()
          Start the item.
 void stop()
          Stop the item.
 String undeploy()
           
 
Methods inherited from class org.mule.registry.impl.AbstractEntry
checkDescriptor, getCurrentState, getInstallRoot, getName, getRegistry, getStateAtShutdown, readObject, setCurrentState, setInstallRoot, setName, setRegistry, setStateAtShutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.registry.Unit
getRegistryComponent
 
Methods inherited from interface org.mule.registry.Entry
getCurrentState, getInstallRoot, getName, getStateAtShutdown, setCurrentState, setInstallRoot, setName, setStateAtShutdown
 

Constructor Detail

AbstractUnit

protected AbstractUnit(Registry registry)
Method Detail

getAssembly

public Assembly getAssembly()
Specified by:
getAssembly in interface Unit

setAssembly

public void setAssembly(Assembly assembly)
Specified by:
setAssembly in interface Unit

deploy

public final String deploy()
                    throws RegistryException
Specified by:
deploy in interface Unit
Throws:
RegistryException

doDeploy

public abstract String doDeploy()
                         throws Exception
Throws:
Exception

init

public final void init()
                throws RegistryException
Specified by:
init in interface Unit
Throws:
RegistryException

doInit

protected abstract void doInit()
                        throws Exception
Throws:
Exception

start

public final void start()
                 throws RegistryException
Description copied from interface: Unit
Start the item.

Specified by:
start in interface Unit
Throws:
RegistryException - if the item fails to start.

doStart

protected abstract void doStart()
                         throws Exception
Throws:
Exception

stop

public final void stop()
                throws RegistryException
Description copied from interface: Unit
Stop the item. This suspends current messaging activities.

Specified by:
stop in interface Unit
Throws:
RegistryException - if the item fails to stop.

doStop

protected abstract void doStop()
                        throws Exception
Throws:
Exception

shutDown

public final void shutDown()
                    throws RegistryException
Description copied from interface: Unit
Shut down the item. The releases resources, preparatory to uninstallation.

Specified by:
shutDown in interface Unit
Throws:
RegistryException

doShutDown

protected abstract void doShutDown()
                            throws Exception
Throws:
Exception

undeploy

public String undeploy()
                throws RegistryException
Specified by:
undeploy in interface Unit
Throws:
RegistryException

doUndeploy

protected abstract String doUndeploy()
                              throws Exception
Throws:
Exception

setRegistryComponent

public void setRegistryComponent(RegistryComponent component)
Specified by:
setRegistryComponent in interface Unit


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.