org.apache.qpid.management.domain.model.type
Class Type

java.lang.Object
  extended by org.apache.qpid.management.domain.model.type.Type
Direct Known Subclasses:
AbsTime, Boolean, DeltaTime, Double, Float, Int16, Int32, Int64, Int8, Map, ObjectReference, Str16, Str8, Uint16, Uint32, Uint64, Uint8, Uuid

public abstract class Type
extends Object

Layer supertype for all management "types".


Field Summary
protected  Class<?> javaType
          Java representation of this type.
 
Constructor Summary
Type(Class<?> javaType)
          Builds a new management type wiich wraps the given java type.
 
Method Summary
abstract  Object decode(org.apache.qpid.transport.codec.Decoder decoder)
          Each concrete subclass must define here how to decode incoming data according.
abstract  void encode(Object value, org.apache.qpid.transport.codec.Encoder encoder)
          Encodes the given values according to this type definition.
 boolean equals(Object obj)
          Identity for types is based on wrapped java type identity.
 Class<?> getJavaType()
          Returns the wrapped java type.
 int hashCode()
           
 String toString()
          Returns a string representation of this type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

javaType

protected final Class<?> javaType
Java representation of this type.

Constructor Detail

Type

Type(Class<?> javaType)
Builds a new management type wiich wraps the given java type.

Parameters:
javaType - the java type.
Method Detail

getJavaType

public Class<?> getJavaType()
Returns the wrapped java type.

Returns:
the wrapped java type.

decode

public abstract Object decode(org.apache.qpid.transport.codec.Decoder decoder)
Each concrete subclass must define here how to decode incoming data according.

Parameters:
decoder - the decoder used to extract data.
Returns:
the "typed" value.

toString

public String toString()
Returns a string representation of this type.

Overrides:
toString in class Object
Returns:
a string representation of this type.

equals

public boolean equals(Object obj)
Identity for types is based on wrapped java type identity.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

encode

public abstract void encode(Object value,
                            org.apache.qpid.transport.codec.Encoder encoder)
Encodes the given values according to this type definition.

Parameters:
value - the value to be encoded.
encoder - the encoder.


Licensed to the Apache Software Foundation