public abstract class Exchange extends Object
Constructor and Description |
---|
Exchange() |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes()
Retrieve the byte[] representation of the exchange.
|
int |
getConditionFlag() |
String |
getDescription()
Retrieve the description associated with this exchange.
|
int |
getExchangeSubType() |
int |
getExchangeType() |
String |
getIdentifier() |
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(ds.funnel.data.format.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.
|
protected void |
setConditionFlag(int conditionFlag) |
protected void |
setDescription(String description) |
protected void |
setExchangeSubType(int exchangeSubType) |
void |
setExchangeType(int exchangeType) |
protected void |
setIdentifier(String identifier) |
protected void |
setRequest()
Sets this exchange as a request.
|
void |
setRespondTo(String respondTo)
Set the repondTo field for this exchange.
|
protected void |
setResponse()
Sets this exchange as a reponse.
|
void |
setTimestamp(long timestamp)
Set the timestamp for this exchange.
|
abstract void |
unmarshallExchangeSpecificElements(ds.funnel.data.format.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 ds.funnel.data.format.FormatException
IOException
- If there are IO problems while performing this operation.MarshallingException
- If there are Marshalling problems while performing this operation.ds.funnel.data.format.FormatException
public final void reconstruct(byte[] marshalledBytes) throws ds.funnel.data.format.FormatException
marshalledBytes
- The byte[] representation of the exchange.IOException
- If there are IO problems while performing this operation.MarshallingException
- If there are Marshalling problems while performing this
operation.ds.funnel.data.format.FormatException
public abstract boolean isValidExchangeSubType()
true
If the exchange subType is a valid one, or
false
otherwise.public abstract void marshallExchangeSpecificElements(ds.funnel.data.format.FormatWriter mFormat) throws ds.funnel.data.format.FormatException
mFormat
- The buffer formatter to write to.IOException
- If there are IO problems while performing this operation.MarshallingException
- If there are Marshalling problems while performing this operation.ds.funnel.data.format.FormatException
public abstract void unmarshallExchangeSpecificElements(ds.funnel.data.format.FormatReader mFormat) throws ds.funnel.data.format.FormatException
mFormat
- The buffer formatter to read from.IOException
- If there are IO problems while performing this operation.MarshallingException
- If there are Marshalling problems while performing this operation.ds.funnel.data.format.FormatException
public 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.protected void setRequest()
protected void setResponse()
protected void setExchangeSubType(int exchangeSubType)
exchangeSubType
- The exchangeSubType to setpublic int getExchangeSubType()
protected void setConditionFlag(int conditionFlag)
conditionFlag
- The conditionFlag to setpublic int getConditionFlag()
protected void setIdentifier(String identifier)
identifier
- The identifier to setpublic String getIdentifier()
protected void setDescription(String description)
description
- the description to setpublic String getDescription()
public void setRespondTo(String respondTo)
respondTo
- The respondTo to setpublic String getRespondTo()
public void setTimestamp(long timestamp)
timestamp
- The timestamp to setpublic long getTimestamp()
Copyright © 2015. All rights reserved.