com.voytechs.jnetstream.codec
Interface Identity

All Known Subinterfaces:
Field, Header
All Known Implementing Classes:
FieldImpl, HeaderImpl, TCP

public interface Identity

Pure interface which allows an subclass to have Identity such as a name and some properties associated with the Identity. Usually those properties are things such as RFC numbers, descriptions etc... Two standard properties which all subclasses posses are NAME (use the getName() method), SHORT_NAME and DESCRIPTION properties accessed using the getPropertyValue(String) method.


Field Summary
static java.lang.String DESCRIPTION
          Description of the subclassed object.
static java.lang.String SHORT_NAME
          Short name of the subclassed object.
 
Method Summary
 java.lang.String getName()
          Returns the NAME property of this subclassed object.
 Primitive getProperty(java.lang.String propertyName)
          Returns the Property object as a Primitive.
 

Field Detail

SHORT_NAME

static final java.lang.String SHORT_NAME
Short name of the subclassed object.

See Also:
Constant Field Values

DESCRIPTION

static final java.lang.String DESCRIPTION
Description of the subclassed object.

See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
Returns the NAME property of this subclassed object.

Returns:
Name of this object.

getProperty

Primitive getProperty(java.lang.String propertyName)
Returns the Property object as a Primitive. You normally then call the Primitive.getValue() method to retrieve the actual value or use the getPrpertyValue(String) method since it quicker.

Returns:
The property object as a Primitive.