public abstract class Exchange
extends java.lang.Object
| Constructor and Description |
|---|
Exchange() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes()
Retrieve the byte[] representation of the exchange.
|
int |
getConditionFlag() |
java.lang.String |
getDescription()
Retrieve the description associated with this exchange.
|
int |
getExchangeSubType() |
int |
getExchangeType() |
java.lang.String |
getIdentifier() |
java.lang.String |
getRespondTo()
Retrieve the respondTo field for this exchange.
|
long |
getTimestamp()
Retrieve the timestamp for this exchange.
|
boolean |
isRequest()
Indicates whether this exchange is a Request
|
boolean |
isResponse()
Indicates whether this exchange is a Response to a previously issued
request.
|
abstract boolean |
isValidExchangeSubType()
Checks to see if the exchange sub-type in the reconstructed exchange is a
valid one.
|
abstract void |
marshallExchangeSpecificElements(FormatWriter mFormat)
This method is utilized by the derived classes to marshall (or serialize)
elements that are specific to the derived class.
|
void |
reconstruct(byte[] marshalledBytes)
Reconstruct the exchange from the byte[] representation.
|
void |
setExchangeType(int exchangeType) |
void |
setRespondTo(java.lang.String respondTo)
Set the repondTo field for this exchange.
|
void |
setTimestamp(long timestamp)
Set the timestamp for this exchange.
|
abstract void |
unmarshallExchangeSpecificElements(FormatReader mFormat)
This method is utilized by the derived classes to reconstruct elements
that are specific to the derived class.
|
public final byte[] getBytes()
throws FormatException
java.io.IOException - If there are IO problems while performing this operation.MarshallingException - If there are Marshalling problems while performing this operation.FormatExceptionpublic final void reconstruct(byte[] marshalledBytes)
throws FormatException
marshalledBytes - The byte[] representation of the exchange.java.io.IOException - If there are IO problems while performing this operation.MarshallingException - If there are Marshalling problems while performing this
operation.FormatExceptionpublic abstract boolean isValidExchangeSubType()
true If the exchange subType is a valid one, or
false otherwise.public abstract void marshallExchangeSpecificElements(FormatWriter mFormat) throws FormatException
mFormat - The buffer formatter to write to.java.io.IOException - If there are IO problems while performing this operation.MarshallingException - If there are Marshalling problems while performing this operation.FormatExceptionpublic abstract void unmarshallExchangeSpecificElements(FormatReader mFormat) throws FormatException
mFormat - The buffer formatter to read from.java.io.IOException - If there are IO problems while performing this operation.MarshallingException - If there are Marshalling problems while performing this operation.FormatExceptionpublic void setExchangeType(int exchangeType)
exchangeType - The exchangeType to setpublic int getExchangeType()
public boolean isRequest()
true if this exchange is a request;
false otherwise.public boolean isResponse()
true if the exchange is a reponse;
false otherwise.public int getExchangeSubType()
public int getConditionFlag()
public java.lang.String getIdentifier()
public java.lang.String getDescription()
public void setRespondTo(java.lang.String respondTo)
respondTo - The respondTo to setpublic java.lang.String getRespondTo()
public void setTimestamp(long timestamp)
timestamp - The timestamp to setpublic long getTimestamp()