org.mule.registry.impl
Class AbstractAssembly

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

public abstract class AbstractAssembly
extends AbstractEntry
implements Assembly

See Also:
Serialized Form

Field Summary
protected  RegistryDescriptor descriptor
           
protected  boolean isTransient
           
protected  List units
           
 
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 AbstractAssembly(Registry registry)
           
 
Method Summary
 void addUnit(Unit unit)
           
protected  void checkDescriptor()
           
 Unit getUnit(String name)
          Return the Unit of the given name.
 Unit[] getUnits()
          Get all units of this Assembly
 boolean isTransient()
           
 void removeUnit(Unit unit)
           
 void restoreState()
           
 void saveAndShutdown()
           
 void setDescriptor(RegistryDescriptor descriptor)
           
 void setTransient(boolean isTransient)
           
 String shutDown()
          Shut down the item.
 String start()
          Start the item.
 String stop()
          Stop the item.
 String undeploy()
           
 
Methods inherited from class org.mule.registry.impl.AbstractEntry
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.Assembly
deploy, getDescriptor
 
Methods inherited from interface org.mule.registry.Entry
getCurrentState, getInstallRoot, getName, getStateAtShutdown, setCurrentState, setInstallRoot, setName, setStateAtShutdown
 

Field Detail

units

protected List units

isTransient

protected boolean isTransient

descriptor

protected RegistryDescriptor descriptor
Constructor Detail

AbstractAssembly

protected AbstractAssembly(Registry registry)
Method Detail

getUnit

public Unit getUnit(String name)
Description copied from interface: Assembly
Return the Unit of the given name.

Specified by:
getUnit in interface Assembly
Parameters:
name - the name of the unit
Returns:
the Unit or null if not found

addUnit

public void addUnit(Unit unit)

removeUnit

public void removeUnit(Unit unit)

getUnits

public Unit[] getUnits()
Description copied from interface: Assembly
Get all units of this Assembly

Specified by:
getUnits in interface Assembly
Returns:
the units of this Assembly

checkDescriptor

protected void checkDescriptor()
                        throws RegistryException
Overrides:
checkDescriptor in class AbstractEntry
Throws:
RegistryException

start

public String start()
             throws RegistryException
Description copied from interface: Assembly
Start the item.

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

stop

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

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

shutDown

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

Specified by:
shutDown in interface Assembly
Throws:
RegistryException - if the item fails to shut down.

undeploy

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

isTransient

public boolean isTransient()
Specified by:
isTransient in interface Assembly

setTransient

public void setTransient(boolean isTransient)
Specified by:
setTransient in interface Assembly

restoreState

public void restoreState()
                  throws RegistryException
Specified by:
restoreState in interface Assembly
Throws:
RegistryException

saveAndShutdown

public void saveAndShutdown()
                     throws RegistryException
Specified by:
saveAndShutdown in interface Assembly
Throws:
RegistryException

setDescriptor

public void setDescriptor(RegistryDescriptor descriptor)
Specified by:
setDescriptor in interface Assembly


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