org.apache.activemq.transport.xmpp
Class ProtocolConverter
java.lang.Object
org.apache.activemq.transport.xmpp.ProtocolConverter
public class ProtocolConverter
- extends java.lang.Object
TODO lots of this code could be shared with Stomp
|
Method Summary |
protected void |
addActiveMQMessageHeaders(ActiveMQMessage answer,
Message message)
|
protected ActiveMQDestination |
createActiveMQDestination(java.lang.String jabberDestination)
Converts the Jabber destination name into a destination in ActiveMQ |
protected ActiveMQMessage |
createActiveMQMessage(Message message)
|
protected java.lang.String |
createChallengeValue(Auth auth)
|
void |
createDestination(java.lang.String to)
|
protected Handler<Response> |
createErrorHandler(java.lang.String text)
|
protected Feature |
createFeature(java.lang.String var)
|
protected Identity |
createIdentity(java.lang.String category,
java.lang.String type,
java.lang.String name)
|
protected Item |
createItem(java.lang.String jid,
java.lang.String name,
java.lang.String node)
|
protected Iq |
createResult(Iq iq)
Creates a result command from the input |
protected Message |
createXmppMessage(java.lang.String to,
MessageDispatch messageDispatch)
|
protected java.lang.String |
debugString(Iq iq)
|
protected int |
generateCommandId()
|
protected void |
initialiseRegistry()
|
void |
onActiveMQCommand(Command command)
|
protected void |
onAuth(Auth auth)
|
protected void |
onAuthQuery(java.lang.Object any,
Iq iq)
|
protected void |
onDiscoInfo(Iq iq,
Query query)
|
protected void |
onDiscoItems(Iq iq,
Query query)
|
protected void |
onIq(Iq iq)
|
protected void |
onMessage(Message message)
|
protected void |
onPresence(Presence presence)
|
protected void |
onStarttls(Starttls starttls)
|
void |
onXmppCommand(java.lang.Object command)
|
protected void |
sendPresence(Presence presence,
Item item)
|
protected void |
sendToActiveMQ(Command command,
Handler<Response> handler)
|
protected void |
subscribe(java.lang.String to,
ActiveMQDestination destination,
java.util.Map<java.lang.String,ConsumerInfo> consumerMap)
|
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 |
ProtocolConverter
public ProtocolConverter(XmppTransport transport)
generateCommandId
protected int generateCommandId()
initialiseRegistry
protected void initialiseRegistry()
onXmppCommand
public void onXmppCommand(java.lang.Object command)
throws java.lang.Exception
- Throws:
java.lang.Exception
onActiveMQCommand
public void onActiveMQCommand(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(Iq iq)
throws java.lang.Exception
- Throws:
java.lang.Exception
onAuthQuery
protected void onAuthQuery(java.lang.Object any,
Iq iq)
throws java.io.IOException,
javax.jms.JMSException
- Throws:
java.io.IOException
javax.jms.JMSException
createDestination
public void createDestination(java.lang.String to)
throws java.io.IOException,
javax.jms.JMSException
- Throws:
java.io.IOException
javax.jms.JMSException
debugString
protected java.lang.String debugString(Iq iq)
onDiscoItems
protected void onDiscoItems(Iq iq,
Query query)
throws java.io.IOException
- Throws:
java.io.IOException
onDiscoInfo
protected void onDiscoInfo(Iq iq,
Query query)
throws java.io.IOException
- Throws:
java.io.IOException
onPresence
protected void onPresence(Presence presence)
throws java.io.IOException,
javax.jms.JMSException
- Throws:
java.io.IOException
javax.jms.JMSException
subscribe
protected void subscribe(java.lang.String to,
ActiveMQDestination destination,
java.util.Map<java.lang.String,ConsumerInfo> consumerMap)
createXmppMessage
protected Message createXmppMessage(java.lang.String to,
MessageDispatch messageDispatch)
throws java.io.IOException,
javax.jms.JMSException
- Throws:
java.io.IOException
javax.jms.JMSException
sendPresence
protected void sendPresence(Presence presence,
Item item)
throws java.io.IOException
- Throws:
java.io.IOException
createItem
protected Item createItem(java.lang.String jid,
java.lang.String name,
java.lang.String node)
createIdentity
protected Identity createIdentity(java.lang.String category,
java.lang.String type,
java.lang.String name)
createFeature
protected Feature createFeature(java.lang.String var)
createResult
protected Iq createResult(Iq iq)
- Creates a result command from the input
sendToActiveMQ
protected void sendToActiveMQ(Command command,
Handler<Response> handler)
onStarttls
protected void onStarttls(Starttls starttls)
throws java.lang.Exception
- Throws:
java.lang.Exception
onMessage
protected void onMessage(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(Message message)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
addActiveMQMessageHeaders
protected void addActiveMQMessageHeaders(ActiveMQMessage answer,
Message message)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
onAuth
protected void onAuth(Auth auth)
throws java.lang.Exception
- Throws:
java.lang.Exception
createChallengeValue
protected java.lang.String createChallengeValue(Auth auth)
Copyright © 2005-2011 FuseSource, Corp.. All Rights Reserved.