org.mule.tck.testmodels.mule
Class TestAgent

java.lang.Object
  extended by org.mule.tck.testmodels.mule.TestAgent
All Implemented Interfaces:
Disposable, Initialisable, Lifecycle, Startable, Stoppable, UMOAgent

public class TestAgent
extends Object
implements UMOAgent

Mock agent


Constructor Summary
TestAgent()
           
 
Method Summary
 void dispose()
          A lifecycle method where implementor should free up any resources.
 String getDescription()
          Should be a 1 line description of the agent
 String getName()
          Gets the name of this agent
 void initialise()
          Method used to perform any initialisation work.
 void registered()
           
 void setName(String name)
          Sets the name of this agent
 void start()
           
 void stop()
           
 void unregistered()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestAgent

public TestAgent()
Method Detail

getName

public String getName()
Description copied from interface: UMOAgent
Gets the name of this agent

Specified by:
getName in interface UMOAgent
Returns:
the agent name

setName

public void setName(String name)
Description copied from interface: UMOAgent
Sets the name of this agent

Specified by:
setName in interface UMOAgent
Parameters:
name - the name of the agent

getDescription

public String getDescription()
Description copied from interface: UMOAgent
Should be a 1 line description of the agent

Specified by:
getDescription in interface UMOAgent
Returns:

initialise

public 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

start

public void start()
           throws UMOException
Specified by:
start in interface Startable
Throws:
UMOException

stop

public void stop()
          throws UMOException
Specified by:
stop in interface Stoppable
Throws:
UMOException

dispose

public void dispose()
Description copied from interface: Disposable
A lifecycle method where implementor should free up any resources. If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions.

Specified by:
dispose in interface Disposable

registered

public void registered()
Specified by:
registered in interface UMOAgent

unregistered

public void unregistered()
Specified by:
unregistered in interface UMOAgent


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