org.apache.qpid.framing
Class AMQTypedValue

java.lang.Object
  extended by org.apache.qpid.framing.AMQTypedValue

public class AMQTypedValue
extends Object

AMQTypedValue combines together a native Java Object value, and an AMQType, as a fully typed AMQP parameter value. It provides the ability to read and write fully typed parameters to and from byte buffers. It also provides the ability to create such parameters from Java native value and a type tag or to extract the native value and type from one.

CRC Card
Responsibilities Collaborations
Create a fully typed AMQP value from a native type and a type tag. AMQType
Create a fully typed AMQP value from a binary representation in a byte buffer. AMQType
Write a fully typed AMQP value to a binary representation in a byte buffer. AMQType
Extract the type from a fully typed AMQP value.
Extract the value from a fully typed AMQP value.


Constructor Summary
AMQTypedValue(AMQType type, Object value)
           
 
Method Summary
 boolean equals(Object o)
           
 int getEncodingSize()
           
 AMQType getType()
           
 Object getValue()
           
 int hashCode()
           
static AMQTypedValue readFromBuffer(org.apache.mina.common.ByteBuffer buffer)
           
 String toString()
           
static AMQTypedValue toTypedValue(Object val)
           
 void writeToBuffer(org.apache.mina.common.ByteBuffer buffer)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AMQTypedValue

public AMQTypedValue(AMQType type,
                     Object value)
Method Detail

getType

public AMQType getType()

getValue

public Object getValue()

writeToBuffer

public void writeToBuffer(org.apache.mina.common.ByteBuffer buffer)

getEncodingSize

public int getEncodingSize()

readFromBuffer

public static AMQTypedValue readFromBuffer(org.apache.mina.common.ByteBuffer buffer)

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toTypedValue

public static AMQTypedValue toTypedValue(Object val)


Licensed to the Apache Software Foundation