org.mule
Class AbstractAgent
java.lang.Object
org.mule.AbstractAgent
- All Implemented Interfaces:
- Agent, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, NamedObject
- Direct Known Subclasses:
- AbstractNotificationLoggerAgent, ConfigScannerAgent, DefaultJmxSupportAgent, HeartbeatAgent, JdmkAgent, JmxAgent, Log4jAgent, Mx4jAgent, RemoteDispatcherAgent, RmiRegistryAgent, WrapperManagerAgent
public abstract class AbstractAgent
- extends Object
- implements Agent, MuleContextAware
Implements common methods for all Agents. Importantly, the Management context is made available to Agents that
extend this.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mule.api.lifecycle.Startable |
start |
| Methods inherited from interface org.mule.api.lifecycle.Stoppable |
stop |
muleContext
protected MuleContext muleContext
name
protected String name
AbstractAgent
protected AbstractAgent(String name)
getName
public final String getName()
- Description copied from interface:
NamedObject
- Gets the name of the object
- Specified by:
getName in interface NamedObject
- Returns:
- the name of the object
setName
public final void setName(String name)
- Description copied from interface:
NamedObject
- Sets the name of the object
- Specified by:
setName in interface NamedObject
- Parameters:
name - the name of the object
getDescription
public String getDescription()
- Description copied from interface:
Agent
- Should be a 1 line description of the agent
- Specified by:
getDescription in interface Agent
getDependentAgents
public List<Class<Agent>> getDependentAgents()
- Specified by:
getDependentAgents in interface Agent
- Returns:
- List of Class objects (agent classes) that this Agent requires to be
started before it can start itself. The implementation of this class may never
return
null.
setMuleContext
public void setMuleContext(MuleContext context)
- Specified by:
setMuleContext in interface MuleContextAware
initialise
public abstract void initialise()
throws InitialisationException
- Description copied from interface:
Initialisable
- Method used to perform any initialisation work. If a fatal error occurs during
initialisation an
InitialisationException should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
- Specified by:
initialise in interface Initialisable
- Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from
Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.