Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.activemq.transport.jabber
Class JabberWireFormat  view JabberWireFormat download JabberWireFormat.java

java.lang.Object
  extended byorg.activemq.io.AbstractWireFormat
      extended byorg.activemq.transport.jabber.JabberWireFormat
All Implemented Interfaces:
org.activemq.io.WireFormat

public class JabberWireFormat
extends org.activemq.io.AbstractWireFormat

A wire format which uses XMPP format of messages

Version:
$Revision: 1.1 $

Field Summary
private static org.apache.commons.logging.Log log
           
 
Fields inherited from class org.activemq.io.AbstractWireFormat
cachingEnabled, transportDataIn, transportDataOut
 
Fields inherited from interface org.activemq.io.WireFormat
DEFAULT_MAXIMUM_MESSAGE_SIZE
 
Constructor Summary
JabberWireFormat()
           
 
Method Summary
 boolean canProcessWireFormatVersion(int version)
          Can this wireformat process packets of this version
 org.activemq.io.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, int offset, int length)
           
 int getCurrentWireFormatVersion()
           
protected  java.lang.String getXmppType(org.activemq.message.ActiveMQMessage message)
           
 org.activemq.message.Packet readPacket(java.io.DataInput in)
          Reads a packet from the given input stream
 org.activemq.message.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(org.activemq.message.ActiveMQBytesMessage message, java.io.DataOutput out)
           
protected  void writeMessage(org.activemq.message.ActiveMQMessage message, java.lang.String body, java.io.DataOutput out)
           
protected  void writeObjectMessage(org.activemq.message.ActiveMQObjectMessage message, java.io.DataOutput out)
           
 org.activemq.message.Packet writePacket(org.activemq.message.Packet packet, java.io.DataOutput out)
          Writes the packet to the given output stream
protected  void writeTextMessage(org.activemq.message.ActiveMQTextMessage message, java.io.DataOutput out)
           
 
Methods inherited from class org.activemq.io.AbstractWireFormat
doesSupportMessageCompression, doesSupportMessageFragmentation, fromBytes, fromBytes, getTransportDataIn, getTransportDataOut, initiateClientSideProtocol, initiateServerSideProtocol, isCachingEnabled, readPacket, registerTransportStreams, setCachingEnabled, setTransportDataIn, setTransportDataOut, toBytes, writePacket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log
Constructor Detail

JabberWireFormat

public JabberWireFormat()
Method Detail

copy

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


readPacket

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


readPacket

public org.activemq.message.Packet readPacket(int firstByte,
                                              java.io.DataInput in)
                                       throws java.io.IOException
Description copied from interface: org.activemq.io.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.


writePacket

public org.activemq.message.Packet writePacket(org.activemq.message.Packet packet,
                                               java.io.DataOutput out)
                                        throws java.io.IOException,
                                               javax.jms.JMSException
Description copied from interface: org.activemq.io.WireFormat
Writes the packet to the given output stream


canProcessWireFormatVersion

public boolean canProcessWireFormatVersion(int version)
Can this wireformat process packets of this version


getCurrentWireFormatVersion

public int getCurrentWireFormatVersion()

writeObjectMessage

protected void writeObjectMessage(org.activemq.message.ActiveMQObjectMessage message,
                                  java.io.DataOutput out)
                           throws javax.jms.JMSException,
                                  java.io.IOException

writeTextMessage

protected void writeTextMessage(org.activemq.message.ActiveMQTextMessage message,
                                java.io.DataOutput out)
                         throws javax.jms.JMSException,
                                java.io.IOException

writeBytesMessage

protected void writeBytesMessage(org.activemq.message.ActiveMQBytesMessage message,
                                 java.io.DataOutput out)
                          throws java.io.IOException

writeMessage

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

encodeBinary

protected java.lang.String encodeBinary(byte[] data,
                                        int offset,
                                        int length)

getXmppType

protected java.lang.String getXmppType(org.activemq.message.ActiveMQMessage message)