com.caucho.amqp.io
Class AmqpWriter

java.lang.Object
  extended by com.caucho.amqp.io.AmqpWriter
All Implemented Interfaces:
AmqpConstants

public class AmqpWriter
extends java.lang.Object
implements AmqpConstants

AMQP frame

 b0-b3 - size
 b4    - data offset
 b5    - type
 b6-b7 - extra (frame type specific, channel)
 


Field Summary
 
Fields inherited from interface com.caucho.amqp.io.AmqpConstants
E_ARRAY_1, E_ARRAY_4, E_BIN_1, E_BIN_4, E_BOOLEAN_1, E_BYTE_1, E_CHAR, E_DECIMAL_16, E_DECIMAL_4, E_DECIMAL_8, E_DESCRIPTOR, E_DOUBLE, E_FALSE, E_FLOAT, E_I0, E_INT_1, E_INT_4, E_L0, E_LIST_0, E_LIST_1, E_LIST_4, E_LONG_1, E_LONG_8, E_MAP_1, E_MAP_4, E_NULL, E_SHORT, E_SYMBOL_1, E_SYMBOL_4, E_TIMESTAMP, E_TRUE, E_UBYTE_1, E_UINT_1, E_UINT_4, E_ULONG_1, E_ULONG_8, E_USHORT, E_UTF8_1, E_UTF8_4, E_UUID, FT_CONN_CLOSE, FT_CONN_OPEN, FT_ERROR, FT_LINK_ATTACH, FT_LINK_DETACH, FT_LINK_FLOW, FT_MESSAGE_DISPOSITION, FT_MESSAGE_TRANSFER, FT_SESSION_END, FT_SESSION_OPEN, MIN_MAX_FRAME_SIZE, ST_MESSAGE_ACCEPTED, ST_MESSAGE_ANN, ST_MESSAGE_APP_PROPERTIES, ST_MESSAGE_DATA, ST_MESSAGE_DELIVERY_ANN, ST_MESSAGE_FOOTER, ST_MESSAGE_HEADER, ST_MESSAGE_MODIFIED, ST_MESSAGE_PROPERTIES, ST_MESSAGE_RECEIVED, ST_MESSAGE_REJECTED, ST_MESSAGE_RELEASED, ST_MESSAGE_SEQUENCE, ST_MESSAGE_SOURCE, ST_MESSAGE_TARGET, ST_MESSAGE_VALUE, ST_NODE_DELETE_ON_CLOSE, ST_NODE_DELETE_ON_NO_LINK, ST_NODE_DELETE_ON_NO_LINK_OR_MESSAGES, ST_NODE_DELETE_ON_NO_MESSAGES, ST_SASL_CHALLENGE, ST_SASL_INIT, ST_SASL_MECHANISMS, ST_SASL_OUTCOME, ST_SASL_RESPONSE, ST_XA_COORDINATOR, ST_XA_DECLARE, ST_XA_DECLARED, ST_XA_DISCHARGE, ST_XA_STATE
 
Constructor Summary
AmqpWriter()
           
 
Method Summary
 void finishArray(int startOffset, int count)
           
 void finishList(int startOffset, int count)
           
 void finishMap(int startOffset, int count)
           
 void flush()
           
 void init(java.io.OutputStream os)
           
 void initBase(AmqpBaseWriter os)
           
 int startArray(int code)
           
 int startList()
           
 int startMap()
           
 void writeAnnotationsMap(java.util.Map<?,?> map)
           
 void writeArray(java.util.List<?> list)
           
 void writeBinary(byte[] buffer)
           
 void writeBinary(byte[] buffer, int offset, int length)
           
 void writeBoolean(boolean value)
           
 void writeByte(int value)
           
 void writeDescriptor(long code)
           
 void writeFieldsMap(java.util.Map<?,?> map)
           
 void writeInt(int value)
           
 void writeList(java.util.List<?> list)
           
 void writeLong(long value)
           
 void writeMap(java.util.Map<?,?> map)
           
 void writeNull()
           
 void writeObject(AmqpAbstractPacket value)
           
 void writeObject(java.lang.Object value)
           
 void writeShort(int value)
           
 void writeString(java.lang.String value)
           
 void writeSymbol(java.lang.String value)
           
 void writeSymbolArray(java.util.List<java.lang.String> list)
           
 void writeTimestamp(long value)
           
 void writeUbyte(int value)
           
 void writeUint(int value)
           
 void writeUlong(long value)
           
 void writeUshort(int value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AmqpWriter

public AmqpWriter()
Method Detail

init

public void init(java.io.OutputStream os)

initBase

public void initBase(AmqpBaseWriter os)

writeNull

public void writeNull()
               throws java.io.IOException
Throws:
java.io.IOException

writeBoolean

public void writeBoolean(boolean value)
                  throws java.io.IOException
Throws:
java.io.IOException

writeByte

public void writeByte(int value)
               throws java.io.IOException
Throws:
java.io.IOException

writeUbyte

public void writeUbyte(int value)
                throws java.io.IOException
Throws:
java.io.IOException

writeShort

public void writeShort(int value)
                throws java.io.IOException
Throws:
java.io.IOException

writeUshort

public void writeUshort(int value)
                 throws java.io.IOException
Throws:
java.io.IOException

writeInt

public void writeInt(int value)
              throws java.io.IOException
Throws:
java.io.IOException

writeUint

public void writeUint(int value)
               throws java.io.IOException
Throws:
java.io.IOException

writeLong

public void writeLong(long value)
               throws java.io.IOException
Throws:
java.io.IOException

writeUlong

public void writeUlong(long value)
                throws java.io.IOException
Throws:
java.io.IOException

writeTimestamp

public void writeTimestamp(long value)
                    throws java.io.IOException
Throws:
java.io.IOException

writeString

public void writeString(java.lang.String value)
                 throws java.io.IOException
Throws:
java.io.IOException

writeSymbol

public void writeSymbol(java.lang.String value)
                 throws java.io.IOException
Throws:
java.io.IOException

writeBinary

public void writeBinary(byte[] buffer)
                 throws java.io.IOException
Throws:
java.io.IOException

writeBinary

public void writeBinary(byte[] buffer,
                        int offset,
                        int length)
                 throws java.io.IOException
Throws:
java.io.IOException

writeDescriptor

public void writeDescriptor(long code)
                     throws java.io.IOException
Throws:
java.io.IOException

writeObject

public void writeObject(AmqpAbstractPacket value)
                 throws java.io.IOException
Throws:
java.io.IOException

writeObject

public void writeObject(java.lang.Object value)
                 throws java.io.IOException
Throws:
java.io.IOException

writeList

public void writeList(java.util.List<?> list)
               throws java.io.IOException
Throws:
java.io.IOException

startList

public int startList()
              throws java.io.IOException
Throws:
java.io.IOException

finishList

public void finishList(int startOffset,
                       int count)

writeArray

public void writeArray(java.util.List<?> list)
                throws java.io.IOException
Throws:
java.io.IOException

startArray

public int startArray(int code)
               throws java.io.IOException
Throws:
java.io.IOException

finishArray

public void finishArray(int startOffset,
                        int count)

writeSymbolArray

public void writeSymbolArray(java.util.List<java.lang.String> list)
                      throws java.io.IOException
Throws:
java.io.IOException

writeMap

public void writeMap(java.util.Map<?,?> map)
              throws java.io.IOException
Throws:
java.io.IOException

writeAnnotationsMap

public void writeAnnotationsMap(java.util.Map<?,?> map)
                         throws java.io.IOException
Throws:
java.io.IOException

writeFieldsMap

public void writeFieldsMap(java.util.Map<?,?> map)
                    throws java.io.IOException
Throws:
java.io.IOException

startMap

public int startMap()
             throws java.io.IOException
Throws:
java.io.IOException

finishMap

public void finishMap(int startOffset,
                      int count)

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException