T - Template class for the embedded object. It must be Serializable.D - Template class for the encoded objectpublic abstract class BusMessage<T extends Serializable,D> extends Object implements Serializable
| Constructor and Description |
|---|
BusMessage(T obj)
Build a BusMessage from the provided Object.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract D |
encodeObject(T obj)
Subclasses must provide a specific implementation of the encoding process.
|
String |
getClassName()
Get the class name of the embedded object.
|
D |
getEncodedData()
Get the Encoded version of the embedded Object.
|
T |
getObject()
Get the original version of the embedded Object.
|
AgentInfo |
getOriginAgentInfo()
The Origin of the BusMessage, the bus registration name of the Agent from which it
originated.
|
long |
getTimeStamp()
Get the timestamp in CCS milliseconds of when the message was created.
|
void |
setOriginAgentInfo(AgentInfo agent)
Sets the origin for this BusMessage.
|
String |
toString() |
public BusMessage(T obj)
obj - The Serializable object to be sent over the buses.protected abstract D encodeObject(T obj)
obj - The Serializable object embedded in the BusMessage.public String getClassName()
public D getEncodedData()
public T getObject()
RuntimeException - if the embedded object cannot be de-serialized.public AgentInfo getOriginAgentInfo()
public final void setOriginAgentInfo(AgentInfo agent)
agent - The origin of the BusMessage.public long getTimeStamp()
Copyright © 2016 LSST. All rights reserved.