org.codehaus.activemq.transport.jabber
Class JabberWireFormat

java.lang.Object
  extended byorg.codehaus.activemq.message.WireFormat
      extended byorg.codehaus.activemq.transport.jabber.JabberWireFormat

public class JabberWireFormat
extends WireFormat

A wire format which uses XMPP format of messages

Version:
$Revision: 1.2 $

Constructor Summary
JabberWireFormat()
           
 
Method Summary
 WireFormat copy()
          Creates a new copy of this wire format so it can be used in another thread/context
protected  java.lang.String encodeBinary(byte[] data)
           
protected  java.lang.String getXmppType(ActiveMQMessage message)
           
 Packet readPacket(java.io.DataInput in)
          Reads a packet from the given input stream
 Packet readPacket(int firstByte, java.io.DataInput in)
          A helper method for working with sockets where the first byte is read first, then the rest of the message is read.
protected  void writeBytesMessage(ActiveMQBytesMessage message, java.io.DataOutput out)
           
protected  void writeMessage(ActiveMQMessage message, java.lang.String body, java.io.DataOutput out)
           
protected  void writeObjectMessage(ActiveMQObjectMessage message, java.io.DataOutput out)
           
 void writePacket(Packet packet, java.io.DataOutput out)
          Writes the packet to the given output stream
protected  void writeTextMessage(ActiveMQTextMessage message, java.io.DataOutput out)
           
 
Methods inherited from class org.codehaus.activemq.message.WireFormat
fromBytes, fromBytes, readPacket, toBytes, writePacket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JabberWireFormat

public JabberWireFormat()
Method Detail

copy

public WireFormat copy()
Description copied from class: WireFormat
Creates a new copy of this wire format so it can be used in another thread/context

Specified by:
copy in class WireFormat
Returns:

readPacket

public Packet readPacket(java.io.DataInput in)
                  throws java.io.IOException
Description copied from class: WireFormat
Reads a packet from the given input stream

Specified by:
readPacket in class WireFormat
Parameters:
in -
Returns:
Throws:
java.io.IOException

readPacket

public Packet readPacket(int firstByte,
                         java.io.DataInput in)
                  throws java.io.IOException
Description copied from class: WireFormat
A helper method for working with sockets where the first byte is read first, then the rest of the message is read.

Its common when dealing with sockets to have different timeout semantics until the first non-zero byte is read of a message, after which time a zero timeout is used.

Specified by:
readPacket in class WireFormat
Parameters:
firstByte - the first byte of the packet
in - the rest of the packet
Returns:
Throws:
java.io.IOException

writePacket

public void writePacket(Packet packet,
                        java.io.DataOutput out)
                 throws java.io.IOException,
                        JMSException
Description copied from class: WireFormat
Writes the packet to the given output stream

Specified by:
writePacket in class WireFormat
Parameters:
packet -
out -
Throws:
java.io.IOException
JMSException

writeObjectMessage

protected void writeObjectMessage(ActiveMQObjectMessage message,
                                  java.io.DataOutput out)
                           throws JMSException,
                                  java.io.IOException
Throws:
JMSException
java.io.IOException

writeTextMessage

protected void writeTextMessage(ActiveMQTextMessage message,
                                java.io.DataOutput out)
                         throws JMSException,
                                java.io.IOException
Throws:
JMSException
java.io.IOException

writeBytesMessage

protected void writeBytesMessage(ActiveMQBytesMessage message,
                                 java.io.DataOutput out)
                          throws java.io.IOException
Throws:
java.io.IOException

writeMessage

protected void writeMessage(ActiveMQMessage message,
                            java.lang.String body,
                            java.io.DataOutput out)
                     throws java.io.IOException
Throws:
java.io.IOException

encodeBinary

protected java.lang.String encodeBinary(byte[] data)

getXmppType

protected java.lang.String getXmppType(ActiveMQMessage message)


Copyright © 2004 Protique, Ltd.. All Rights Reserved.