Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

com::codemesh::peer::AbstractPeerType Class Reference
[Java Peer Framework]

A Java class that acts as a baseclass for concrete peer type implementations. More...

Inheritance diagram for com::codemesh::peer::AbstractPeerType:

Inheritance graph
[legend]
Collaboration diagram for com::codemesh::peer::AbstractPeerType:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AbstractPeerType ()
 The public default constructor.
void set_typeInfo (String typeInfo)
 Sets the typeinfo that represents the native instance's type.
String get_typeInfo ()
 Returns the typeinfo that represents the native instance's type.
void set_binaryData (byte[] binaryData)
 Sets the native instance's data into the peer instance in the form of an array of bytes.
byte[] get_binaryData ()
 Returns the native instance's data in the form of an array of bytes.
void set_boolean (String fieldName, boolean b)
 Copies a native value into the peer instance using a name for later lookup.
void set_byte (String fieldName, byte b)
 Copies a native value into the peer instance using a name for later lookup.
void set_char (String fieldName, char ch)
 Copies a native value into the peer instance using a name for later lookup.
void set_double (String fieldName, double d)
 Copies a native value into the peer instance using a name for later lookup.
void set_float (String fieldName, float f)
 Copies a native value into the peer instance using a name for later lookup.
void set_int (String fieldName, int i)
 Copies a native value into the peer instance using a name for later lookup.
void set_long (String fieldName, long l)
 Copies a native value into the peer instance using a name for later lookup.
void set_short (String fieldName, short s)
 Copies a native value into the peer instance using a name for later lookup.
void set_Object (String fieldName, Object o)
 Copies a native value into the peer instance using a name for later lookup.
boolean get_boolean (String fieldName) throws PeerException
 Returns the field's value.
byte get_byte (String fieldName) throws PeerException
 Returns the field's value.
char get_char (String fieldName) throws PeerException
 Returns the field's value.
double get_double (String fieldName) throws PeerException
 Returns the field's value.
float get_float (String fieldName) throws PeerException
 Returns the field's value.
int get_int (String fieldName) throws PeerException
 Returns the field's value.
long get_long (String fieldName) throws PeerException
 Returns the field's value.
short get_short (String fieldName) throws PeerException
 Returns the field's value.
Object get_Object (String fieldName) throws PeerException
 Returns the field's value.
int hashCode ()
boolean equals (Object o)
String toString ()

Public Attributes

String typeInfo = null
 The field which holds the native instance's type information.
byte[] binaryData = null
 The field which holds the native instance's data in binary form.
java.util.Hashtable fields = null
 The field which holds typed data items, indexed by name.

Protected Member Functions

void set (String fieldName, Object o)
Object get (String fieldName)

Detailed Description

A Java class that acts as a baseclass for concrete peer type implementations.

Most concrete peer types might not have to add anything to the implementation of this class. The major driver for subclassing will in all likeliehood be the need to implement one or more interfaces.

For example, the com.codemesh.peer.SerializablePeer type is created by simply mixing in the java.io.Serializable interface.


Member Function Documentation

byte [] com::codemesh::peer::AbstractPeerType::get_binaryData  )  [inline]
 

Returns the native instance's data in the form of an array of bytes.

It is the native type's responsibility to parse the byte array.

Implements com::codemesh::peer::PeerType.

boolean com::codemesh::peer::AbstractPeerType::get_boolean String  fieldName  )  throws PeerException [inline]
 

Returns the field's value.

Exceptions:
PeerException if the field cannot be found or if it is not of the correct type.

Implements com::codemesh::peer::PeerType.

byte com::codemesh::peer::AbstractPeerType::get_byte String  fieldName  )  throws PeerException [inline]
 

Returns the field's value.

Exceptions:
PeerException if the field cannot be found or if it is not of the correct type.

Implements com::codemesh::peer::PeerType.

char com::codemesh::peer::AbstractPeerType::get_char String  fieldName  )  throws PeerException [inline]
 

Returns the field's value.

Exceptions:
PeerException if the field cannot be found or if it is not of the correct type.

Implements com::codemesh::peer::PeerType.

double com::codemesh::peer::AbstractPeerType::get_double String  fieldName  )  throws PeerException [inline]
 

Returns the field's value.

Exceptions:
PeerException if the field cannot be found or if it is not of the correct type.

Implements com::codemesh::peer::PeerType.

float com::codemesh::peer::AbstractPeerType::get_float String  fieldName  )  throws PeerException [inline]
 

Returns the field's value.

Exceptions:
PeerException if the field cannot be found or if it is not of the correct type.

Implements com::codemesh::peer::PeerType.

int com::codemesh::peer::AbstractPeerType::get_int String  fieldName  )  throws PeerException [inline]
 

Returns the field's value.

Exceptions:
PeerException if the field cannot be found or if it is not of the correct type.

Implements com::codemesh::peer::PeerType.

long com::codemesh::peer::AbstractPeerType::get_long String  fieldName  )  throws PeerException [inline]
 

Returns the field's value.

Exceptions:
PeerException if the field cannot be found or if it is not of the correct type.

Implements com::codemesh::peer::PeerType.

Object com::codemesh::peer::AbstractPeerType::get_Object String  fieldName  )  throws PeerException [inline]
 

Returns the field's value.

Exceptions:
PeerException if the field cannot be found or if it is not of the correct type.

Implements com::codemesh::peer::PeerType.

short com::codemesh::peer::AbstractPeerType::get_short String  fieldName  )  throws PeerException [inline]
 

Returns the field's value.

Exceptions:
PeerException if the field cannot be found or if it is not of the correct type.

Implements com::codemesh::peer::PeerType.


The documentation for this class was generated from the following file:
Generated on Wed May 31 14:01:36 2006 for Shared Codemesh Runtime Library API Reference by  doxygen 1.4.1