org.apache.activemq.broker.util
Class CommandMessageListener

java.lang.Object
  extended by org.apache.activemq.broker.util.CommandMessageListener
All Implemented Interfaces:
MessageListener

public class CommandMessageListener
extends Object
implements MessageListener


Constructor Summary
CommandMessageListener(Session session)
           
 
Method Summary
protected  void addReplyHeaders(TextMessage request, Message response)
           
 CommandHandler getHandler()
           
 MessageProducer getProducer()
           
 Session getSession()
           
 void onMessage(Message message)
           
 Message processCommand(TextMessage request)
          Processes an incoming JMS message returning the response message
 String processCommandText(String line)
          Processes an incoming command from a console and returning the text to output
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandMessageListener

public CommandMessageListener(Session session)
Method Detail

onMessage

public void onMessage(Message message)
Specified by:
onMessage in interface MessageListener

addReplyHeaders

protected void addReplyHeaders(TextMessage request,
                               Message response)
                        throws JMSException
Throws:
JMSException

processCommand

public Message processCommand(TextMessage request)
                       throws Exception
Processes an incoming JMS message returning the response message

Throws:
Exception

processCommandText

public String processCommandText(String line)
                          throws Exception
Processes an incoming command from a console and returning the text to output

Throws:
Exception

getSession

public Session getSession()

getProducer

public MessageProducer getProducer()
                            throws JMSException
Throws:
JMSException

getHandler

public CommandHandler getHandler()
                          throws IllegalAccessException,
                                 IOException,
                                 InstantiationException,
                                 ClassNotFoundException
Throws:
IllegalAccessException
IOException
InstantiationException
ClassNotFoundException


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