org.apache.activemq.broker.util
Class CommandAgent

java.lang.Object
  extended by org.apache.activemq.broker.util.CommandAgent
All Implemented Interfaces:
ExceptionListener, Service

public class CommandAgent
extends Object
implements Service, ExceptionListener

An agent which listens to commands on a JMS destination


Constructor Summary
CommandAgent()
           
 
Method Summary
protected  Destination createCommandDestination()
           
protected  Connection createConnection()
           
 String getBrokerUrl()
           
 Destination getCommandDestination()
           
 Connection getConnection()
           
 ConnectionFactory getConnectionFactory()
           
 String getPassword()
           
 String getUsername()
           
 void onException(JMSException exception)
           
 void setBrokerUrl(String brokerUrl)
           
 void setCommandDestination(Destination commandDestination)
           
 void setConnection(Connection connection)
           
 void setConnectionFactory(ConnectionFactory connectionFactory)
           
 void setPassword(String password)
           
 void setUsername(String username)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandAgent

public CommandAgent()
Method Detail

start

@PostConstruct
public void start()
           throws Exception
Specified by:
start in interface Service
Throws:
Exception

stop

@PreDestroy
public void stop()
          throws Exception
Specified by:
stop in interface Service
Throws:
Exception

getBrokerUrl

public String getBrokerUrl()

setBrokerUrl

public void setBrokerUrl(String brokerUrl)

getUsername

public String getUsername()

setUsername

public void setUsername(String username)

getPassword

public String getPassword()

setPassword

public void setPassword(String password)

getConnectionFactory

public ConnectionFactory getConnectionFactory()

setConnectionFactory

public void setConnectionFactory(ConnectionFactory connectionFactory)

getConnection

public Connection getConnection()
                         throws JMSException
Throws:
JMSException

setConnection

public void setConnection(Connection connection)

getCommandDestination

public Destination getCommandDestination()

setCommandDestination

public void setCommandDestination(Destination commandDestination)

createConnection

protected Connection createConnection()
                               throws JMSException
Throws:
JMSException

createCommandDestination

protected Destination createCommandDestination()

onException

public void onException(JMSException exception)
Specified by:
onException in interface ExceptionListener


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.