org.apache.activemq.transport.stomp
Class ProtocolConverter

java.lang.Object
  extended by org.apache.activemq.transport.stomp.ProtocolConverter

public class ProtocolConverter
extends java.lang.Object

Author:
chirino

Constructor Summary
ProtocolConverter(StompTransport stompTransport, FrameTranslator translator, BrokerContext brokerContext)
           
 
Method Summary
protected  void checkConnected()
           
 StompFrame convertMessage(ActiveMQMessage message, boolean ignoreTransformation)
           
 ActiveMQMessage convertMessage(StompFrame command)
           
protected  org.apache.activemq.transport.stomp.ResponseHandler createResponseHandler(StompFrame command)
           
 ActiveMQDestination createTempQueue(java.lang.String name)
           
 ActiveMQDestination createTempTopic(java.lang.String name)
           
protected  FrameTranslator findTranslator(java.lang.String header)
           
protected  int generateCommandId()
           
 java.lang.String getCreatedTempDestinationName(ActiveMQDestination destination)
           
 StompTransport getStompTransport()
           
protected  void handleException(java.lang.Throwable exception, StompFrame command)
           
 void onActiveMQCommand(Command command)
          Dispatch a ActiveMQ command
protected  void onStompAbort(StompFrame command)
           
protected  void onStompAck(StompFrame command)
           
protected  void onStompBegin(StompFrame command)
           
 void onStompCommand(StompFrame command)
          Convert a stomp command
protected  void onStompCommit(StompFrame command)
           
protected  void onStompConnect(StompFrame command)
           
protected  void onStompDisconnect(StompFrame command)
           
protected  void onStompSend(StompFrame command)
           
protected  void onStompSubscribe(StompFrame command)
           
protected  void onStompUnsubscribe(StompFrame command)
           
protected  void sendToActiveMQ(Command command, org.apache.activemq.transport.stomp.ResponseHandler handler)
           
protected  void sendToStomp(StompFrame command)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtocolConverter

public ProtocolConverter(StompTransport stompTransport,
                         FrameTranslator translator,
                         BrokerContext brokerContext)
Method Detail

generateCommandId

protected int generateCommandId()

createResponseHandler

protected org.apache.activemq.transport.stomp.ResponseHandler createResponseHandler(StompFrame command)

sendToActiveMQ

protected void sendToActiveMQ(Command command,
                              org.apache.activemq.transport.stomp.ResponseHandler handler)

sendToStomp

protected void sendToStomp(StompFrame command)
                    throws java.io.IOException
Throws:
java.io.IOException

findTranslator

protected FrameTranslator findTranslator(java.lang.String header)

onStompCommand

public void onStompCommand(StompFrame command)
                    throws java.io.IOException,
                           javax.jms.JMSException
Convert a stomp command

Parameters:
command -
Throws:
java.io.IOException
javax.jms.JMSException

handleException

protected void handleException(java.lang.Throwable exception,
                               StompFrame command)
                        throws java.io.IOException
Throws:
java.io.IOException

onStompSend

protected void onStompSend(StompFrame command)
                    throws java.io.IOException,
                           javax.jms.JMSException
Throws:
java.io.IOException
javax.jms.JMSException

onStompAck

protected void onStompAck(StompFrame command)
                   throws ProtocolException
Throws:
ProtocolException

onStompBegin

protected void onStompBegin(StompFrame command)
                     throws ProtocolException
Throws:
ProtocolException

onStompCommit

protected void onStompCommit(StompFrame command)
                      throws ProtocolException
Throws:
ProtocolException

onStompAbort

protected void onStompAbort(StompFrame command)
                     throws ProtocolException
Throws:
ProtocolException

onStompSubscribe

protected void onStompSubscribe(StompFrame command)
                         throws ProtocolException
Throws:
ProtocolException

onStompUnsubscribe

protected void onStompUnsubscribe(StompFrame command)
                           throws ProtocolException
Throws:
ProtocolException

onStompConnect

protected void onStompConnect(StompFrame command)
                       throws ProtocolException
Throws:
ProtocolException

onStompDisconnect

protected void onStompDisconnect(StompFrame command)
                          throws ProtocolException
Throws:
ProtocolException

checkConnected

protected void checkConnected()
                       throws ProtocolException
Throws:
ProtocolException

onActiveMQCommand

public void onActiveMQCommand(Command command)
                       throws java.io.IOException,
                              javax.jms.JMSException
Dispatch a ActiveMQ command

Parameters:
command -
Throws:
java.io.IOException
javax.jms.JMSException

convertMessage

public ActiveMQMessage convertMessage(StompFrame command)
                               throws java.io.IOException,
                                      javax.jms.JMSException
Throws:
java.io.IOException
javax.jms.JMSException

convertMessage

public StompFrame convertMessage(ActiveMQMessage message,
                                 boolean ignoreTransformation)
                          throws java.io.IOException,
                                 javax.jms.JMSException
Throws:
java.io.IOException
javax.jms.JMSException

getStompTransport

public StompTransport getStompTransport()

createTempQueue

public ActiveMQDestination createTempQueue(java.lang.String name)

createTempTopic

public ActiveMQDestination createTempTopic(java.lang.String name)

getCreatedTempDestinationName

public java.lang.String getCreatedTempDestinationName(ActiveMQDestination destination)


Copyright © 2005-2011 FuseSource, Corp.. All Rights Reserved.