org.apache.activemq.transport.xmpp
Class ProtocolConverter

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

public class ProtocolConverter
extends java.lang.Object

TODO lots of this code could be shared with Stomp


Constructor Summary
ProtocolConverter(XmppTransport transport)
           
 
Method Summary
protected  void addActiveMQMessageHeaders(ActiveMQMessage answer, jabber.client.Message message)
           
protected  ActiveMQDestination createActiveMQDestination(java.lang.String jabberDestination)
          Converts the Jabber destination name into a destination in ActiveMQ
protected  ActiveMQMessage createActiveMQMessage(jabber.client.Message message)
           
protected  java.lang.String createChallengeValue(ietf.params.xml.ns.xmpp_sasl.Auth auth)
           
protected  Handler<Response> createErrorHandler(java.lang.String text)
           
protected  org.jabber.protocol.disco_info.Feature createFeature(java.lang.String var)
           
protected  org.jabber.protocol.disco_info.Identity createIdentity(java.lang.String category, java.lang.String type, java.lang.String name)
           
protected  org.jabber.protocol.disco_items.Item createItem(java.lang.String jid, java.lang.String name, java.lang.String node)
           
protected  jabber.client.Iq createResult(jabber.client.Iq iq)
          Creates a result command from the input
protected  jabber.client.Message createXmppMessage(java.lang.String to, MessageDispatch messageDispatch)
           
protected  java.lang.String debugString(jabber.client.Iq iq)
           
protected  int generateCommandId()
           
protected  void initialiseRegistry()
           
 void onActiveMQCommad(Command command)
           
protected  void onAuth(ietf.params.xml.ns.xmpp_sasl.Auth auth)
           
protected  void onAuthQuery(java.lang.Object any, jabber.client.Iq iq)
           
protected  void onDiscoInfo(jabber.client.Iq iq, org.jabber.protocol.disco_info.Query query)
           
protected  void onDiscoItems(jabber.client.Iq iq, org.jabber.protocol.disco_items.Query query)
           
protected  void onIq(jabber.client.Iq iq)
           
protected  void onMessage(jabber.client.Message message)
           
protected  void onPresence(jabber.client.Presence presence)
           
protected  void onStarttls(ietf.params.xml.ns.xmpp_tls.Starttls starttls)
           
 void onXmppCommand(java.lang.Object command)
           
protected  void sendPresence(jabber.client.Presence presence, org.jabber.protocol.muc_user.Item item)
           
protected  void sendToActiveMQ(Command command, Handler<Response> handler)
           
protected  void unknownCommand(java.lang.Object command)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtocolConverter

public ProtocolConverter(XmppTransport transport)
Method Detail

generateCommandId

protected int generateCommandId()

initialiseRegistry

protected void initialiseRegistry()

onXmppCommand

public void onXmppCommand(java.lang.Object command)
                   throws java.lang.Exception
Throws:
java.lang.Exception

onActiveMQCommad

public void onActiveMQCommad(Command command)
                      throws java.lang.Exception
Throws:
java.lang.Exception

unknownCommand

protected void unknownCommand(java.lang.Object command)
                       throws java.lang.Exception
Throws:
java.lang.Exception

onIq

protected void onIq(jabber.client.Iq iq)
             throws java.lang.Exception
Throws:
java.lang.Exception

onAuthQuery

protected void onAuthQuery(java.lang.Object any,
                           jabber.client.Iq iq)
                    throws java.io.IOException
Throws:
java.io.IOException

debugString

protected java.lang.String debugString(jabber.client.Iq iq)

onDiscoItems

protected void onDiscoItems(jabber.client.Iq iq,
                            org.jabber.protocol.disco_items.Query query)
                     throws java.io.IOException
Throws:
java.io.IOException

onDiscoInfo

protected void onDiscoInfo(jabber.client.Iq iq,
                           org.jabber.protocol.disco_info.Query query)
                    throws java.io.IOException
Throws:
java.io.IOException

onPresence

protected void onPresence(jabber.client.Presence presence)
                   throws java.io.IOException,
                          javax.jms.JMSException
Throws:
java.io.IOException
javax.jms.JMSException

createXmppMessage

protected jabber.client.Message createXmppMessage(java.lang.String to,
                                                  MessageDispatch messageDispatch)
                                           throws javax.jms.JMSException
Throws:
javax.jms.JMSException

sendPresence

protected void sendPresence(jabber.client.Presence presence,
                            org.jabber.protocol.muc_user.Item item)
                     throws java.io.IOException
Throws:
java.io.IOException

createItem

protected org.jabber.protocol.disco_items.Item createItem(java.lang.String jid,
                                                          java.lang.String name,
                                                          java.lang.String node)

createIdentity

protected org.jabber.protocol.disco_info.Identity createIdentity(java.lang.String category,
                                                                 java.lang.String type,
                                                                 java.lang.String name)

createFeature

protected org.jabber.protocol.disco_info.Feature createFeature(java.lang.String var)

createResult

protected jabber.client.Iq createResult(jabber.client.Iq iq)
Creates a result command from the input


sendToActiveMQ

protected void sendToActiveMQ(Command command,
                              Handler<Response> handler)

onStarttls

protected void onStarttls(ietf.params.xml.ns.xmpp_tls.Starttls starttls)
                   throws java.lang.Exception
Throws:
java.lang.Exception

onMessage

protected void onMessage(jabber.client.Message message)
                  throws java.lang.Exception
Throws:
java.lang.Exception

createErrorHandler

protected Handler<Response> createErrorHandler(java.lang.String text)

createActiveMQDestination

protected ActiveMQDestination createActiveMQDestination(java.lang.String jabberDestination)
                                                 throws javax.jms.JMSException
Converts the Jabber destination name into a destination in ActiveMQ

Throws:
javax.jms.JMSException

createActiveMQMessage

protected ActiveMQMessage createActiveMQMessage(jabber.client.Message message)
                                         throws javax.jms.JMSException
Throws:
javax.jms.JMSException

addActiveMQMessageHeaders

protected void addActiveMQMessageHeaders(ActiveMQMessage answer,
                                         jabber.client.Message message)
                                  throws javax.jms.JMSException
Throws:
javax.jms.JMSException

onAuth

protected void onAuth(ietf.params.xml.ns.xmpp_sasl.Auth auth)
               throws java.lang.Exception
Throws:
java.lang.Exception

createChallengeValue

protected java.lang.String createChallengeValue(ietf.params.xml.ns.xmpp_sasl.Auth auth)


Copyright © 2011 Apache Software Foundation. All Rights Reserved.