org.apache.qpid.framing
Class FieldTable

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

public class FieldTable
extends Object


Nested Class Summary
static interface FieldTable.FieldTableElementProcessor
           
 
Constructor Summary
FieldTable()
           
FieldTable(org.apache.mina.common.ByteBuffer buffer, long length)
          Construct a new field table.
 
Method Summary
 void addAll(FieldTable fieldTable)
           
protected static void checkIdentiferFormat(AMQShortString propertyName)
           
 void clear()
           
 boolean containsKey(AMQShortString key)
           
 boolean containsKey(String key)
           
static FieldTable convertToFieldTable(Map<String,Object> map)
           
static Map<String,Object> convertToMap(FieldTable fieldTable)
           
 boolean equals(Object o)
           
 Object get(AMQShortString key)
           
 Object get(String key)
           
 Boolean getBoolean(AMQShortString string)
           
 Boolean getBoolean(String string)
           
 Byte getByte(AMQShortString string)
           
 Byte getByte(String string)
           
 byte[] getBytes(AMQShortString string)
           
 byte[] getBytes(String string)
           
 Character getCharacter(AMQShortString string)
           
 Character getCharacter(String string)
           
 byte[] getDataAsBytes()
           
 BigDecimal getDecimal(AMQShortString propertyName)
           
 Double getDouble(AMQShortString string)
           
 Double getDouble(String string)
           
 long getEncodedSize()
           
 FieldTable getFieldTable(AMQShortString string)
          Extracts a value from the field table that is itself a FieldTable associated with the specified parameter name.
 FieldTable getFieldTable(String string)
          Extracts a value from the field table that is itself a FieldTable associated with the specified parameter name.
 Float getFloat(AMQShortString string)
           
 Float getFloat(String string)
           
 Integer getInteger(AMQShortString string)
           
 Integer getInteger(String string)
           
 Long getLong(AMQShortString string)
           
 Long getLong(String string)
           
 Object getObject(AMQShortString string)
           
 Object getObject(String string)
           
 AMQTypedValue getProperty(AMQShortString string)
           
 Enumeration getPropertyNames()
           
 Short getShort(AMQShortString string)
           
 Short getShort(String string)
           
 String getString(AMQShortString string)
           
 String getString(String string)
           
 Long getTimestamp(AMQShortString name)
           
 int hashCode()
           
 boolean isEmpty()
           
 boolean isNullStringValue(String name)
           
 boolean itemExists(AMQShortString propertyName)
           
 boolean itemExists(String string)
           
 Iterator<Map.Entry<AMQShortString,AMQTypedValue>> iterator()
           
 Set<String> keys()
           
 Set<AMQShortString> keySet()
           
 Object processOverElements(FieldTable.FieldTableElementProcessor processor)
           
 boolean propertyExists(AMQShortString propertyName)
           
 boolean propertyExists(String propertyName)
           
 Object put(AMQShortString key, Object value)
           
 Object remove(AMQShortString key)
           
 Object remove(String key)
           
 AMQTypedValue removeKey(AMQShortString key)
           
 Object setAsciiString(AMQShortString string, String value)
           
 Object setBoolean(AMQShortString string, Boolean b)
           
 Object setBoolean(String string, Boolean b)
           
 Object setByte(AMQShortString string, Byte b)
           
 Object setByte(String string, Byte b)
           
 Object setBytes(AMQShortString string, byte[] bytes)
           
 Object setBytes(AMQShortString string, byte[] bytes, int start, int length)
           
 Object setBytes(String string, byte[] b)
           
 Object setBytes(String string, byte[] bytes, int start, int length)
           
 Object setChar(AMQShortString string, char c)
           
 Object setChar(String string, char c)
           
 Object setDecimal(AMQShortString string, BigDecimal decimal)
           
 Object setDouble(AMQShortString string, Double v)
           
 Object setDouble(String string, Double d)
           
 Object setFieldTable(AMQShortString string, FieldTable ftValue)
          Associates a nested field table with the specified parameter name.
 Object setFieldTable(String string, FieldTable ftValue)
          Associates a nested field table with the specified parameter name.
 Object setFloat(AMQShortString string, Float v)
           
 Object setFloat(String string, Float f)
           
 Object setInteger(AMQShortString string, Integer i)
           
 Object setInteger(String string, Integer i)
           
 Object setLong(AMQShortString string, Long l)
           
 Object setLong(String string, Long l)
           
 Object setObject(AMQShortString string, Object object)
           
 Object setObject(String string, Object o)
           
 Object setShort(AMQShortString string, Short i)
           
 Object setShort(String string, Short i)
           
 Object setString(AMQShortString string, String value)
           
 Object setString(String string, String s)
           
 Object setTimestamp(AMQShortString string, long datetime)
           
 Object setVoid(AMQShortString string)
           
 int size()
           
 String toString()
           
 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

FieldTable

public FieldTable()

FieldTable

public FieldTable(org.apache.mina.common.ByteBuffer buffer,
                  long length)
Construct a new field table.

Parameters:
buffer - the buffer from which to read data. The length byte must be read already
length - the length of the field table. Must be > 0.
Method Detail

getProperty

public AMQTypedValue getProperty(AMQShortString string)

getBoolean

public Boolean getBoolean(String string)

getBoolean

public Boolean getBoolean(AMQShortString string)

getByte

public Byte getByte(String string)

getByte

public Byte getByte(AMQShortString string)

getShort

public Short getShort(String string)

getShort

public Short getShort(AMQShortString string)

getInteger

public Integer getInteger(String string)

getInteger

public Integer getInteger(AMQShortString string)

getLong

public Long getLong(String string)

getLong

public Long getLong(AMQShortString string)

getFloat

public Float getFloat(String string)

getFloat

public Float getFloat(AMQShortString string)

getDouble

public Double getDouble(String string)

getDouble

public Double getDouble(AMQShortString string)

getString

public String getString(String string)

getString

public String getString(AMQShortString string)

getCharacter

public Character getCharacter(String string)

getCharacter

public Character getCharacter(AMQShortString string)

getBytes

public byte[] getBytes(String string)

getBytes

public byte[] getBytes(AMQShortString string)

getFieldTable

public FieldTable getFieldTable(String string)
Extracts a value from the field table that is itself a FieldTable associated with the specified parameter name.

Parameters:
string - The name of the parameter to get the associated FieldTable value for.
Returns:
The associated FieldTable value, or null if the associated value is not of FieldTable type or not present in the field table at all.

getFieldTable

public FieldTable getFieldTable(AMQShortString string)
Extracts a value from the field table that is itself a FieldTable associated with the specified parameter name.

Parameters:
string - The name of the parameter to get the associated FieldTable value for.
Returns:
The associated FieldTable value, or null if the associated value is not of FieldTable type or not present in the field table at all.

getObject

public Object getObject(String string)

getObject

public Object getObject(AMQShortString string)

getTimestamp

public Long getTimestamp(AMQShortString name)

getDecimal

public BigDecimal getDecimal(AMQShortString propertyName)

setBoolean

public Object setBoolean(String string,
                         Boolean b)

setBoolean

public Object setBoolean(AMQShortString string,
                         Boolean b)

setByte

public Object setByte(String string,
                      Byte b)

setByte

public Object setByte(AMQShortString string,
                      Byte b)

setShort

public Object setShort(String string,
                       Short i)

setShort

public Object setShort(AMQShortString string,
                       Short i)

setInteger

public Object setInteger(String string,
                         Integer i)

setInteger

public Object setInteger(AMQShortString string,
                         Integer i)

setLong

public Object setLong(String string,
                      Long l)

setLong

public Object setLong(AMQShortString string,
                      Long l)

setFloat

public Object setFloat(String string,
                       Float f)

setFloat

public Object setFloat(AMQShortString string,
                       Float v)

setDouble

public Object setDouble(String string,
                        Double d)

setDouble

public Object setDouble(AMQShortString string,
                        Double v)

setString

public Object setString(String string,
                        String s)

setAsciiString

public Object setAsciiString(AMQShortString string,
                             String value)

setString

public Object setString(AMQShortString string,
                        String value)

setChar

public Object setChar(String string,
                      char c)

setChar

public Object setChar(AMQShortString string,
                      char c)

setBytes

public Object setBytes(String string,
                       byte[] b)

setBytes

public Object setBytes(AMQShortString string,
                       byte[] bytes)

setBytes

public Object setBytes(String string,
                       byte[] bytes,
                       int start,
                       int length)

setBytes

public Object setBytes(AMQShortString string,
                       byte[] bytes,
                       int start,
                       int length)

setObject

public Object setObject(String string,
                        Object o)

setTimestamp

public Object setTimestamp(AMQShortString string,
                           long datetime)

setDecimal

public Object setDecimal(AMQShortString string,
                         BigDecimal decimal)

setVoid

public Object setVoid(AMQShortString string)

setFieldTable

public Object setFieldTable(String string,
                            FieldTable ftValue)
Associates a nested field table with the specified parameter name.

Parameters:
string - The name of the parameter to store in the table.
ftValue - The field table value to associate with the parameter name.
Returns:
The stored value.

setFieldTable

public Object setFieldTable(AMQShortString string,
                            FieldTable ftValue)
Associates a nested field table with the specified parameter name.

Parameters:
string - The name of the parameter to store in the table.
ftValue - The field table value to associate with the parameter name.
Returns:
The stored value.

setObject

public Object setObject(AMQShortString string,
                        Object object)

isNullStringValue

public boolean isNullStringValue(String name)

getPropertyNames

public Enumeration getPropertyNames()

propertyExists

public boolean propertyExists(AMQShortString propertyName)

propertyExists

public boolean propertyExists(String propertyName)

itemExists

public boolean itemExists(AMQShortString propertyName)

itemExists

public boolean itemExists(String string)

toString

public String toString()
Overrides:
toString in class Object

checkIdentiferFormat

protected static void checkIdentiferFormat(AMQShortString propertyName)

writeToBuffer

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

getDataAsBytes

public byte[] getDataAsBytes()

getEncodedSize

public long getEncodedSize()

addAll

public void addAll(FieldTable fieldTable)

convertToMap

public static Map<String,Object> convertToMap(FieldTable fieldTable)

processOverElements

public Object processOverElements(FieldTable.FieldTableElementProcessor processor)

size

public int size()

isEmpty

public boolean isEmpty()

containsKey

public boolean containsKey(AMQShortString key)

containsKey

public boolean containsKey(String key)

keys

public Set<String> keys()

iterator

public Iterator<Map.Entry<AMQShortString,AMQTypedValue>> iterator()

get

public Object get(String key)

get

public Object get(AMQShortString key)

put

public Object put(AMQShortString key,
                  Object value)

remove

public Object remove(String key)

remove

public Object remove(AMQShortString key)

removeKey

public AMQTypedValue removeKey(AMQShortString key)

clear

public void clear()

keySet

public Set<AMQShortString> keySet()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

convertToFieldTable

public static FieldTable convertToFieldTable(Map<String,Object> map)


Licensed to the Apache Software Foundation