org.portico.shared.msg
Class RTI_RequestMessage
java.lang.Object
com.lbf.commons.messaging.RequestMessage
org.portico.shared.msg.RTI_RequestMessage
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- EXT_Terminate, INT_NewSubscription, INT_ObjectRegistered, RTI_AssociateForUpdates, RTI_CreateFederation, RTI_CreateRegion, RTI_DeleteObject, RTI_DeleteRegion, RTI_DestroyFederation, RTI_DisableTimeConstrained, RTI_DisableTimeRegulation, RTI_EnableTimeConstrained, RTI_EnableTimeRegulation, RTI_JoinFederation, RTI_LocalDelete, RTI_ModifyLookahead, RTI_ModifyRegion, RTI_NextEventRequest, RTI_PublishInteractionClass, RTI_PublishObjectClass, RTI_QueryGALT, RTI_RegisterObject, RTI_RequestClassUpdate, RTI_RequestObjectUpdate, RTI_ResignFederation, RTI_SendInteraction, RTI_SubscribeInteractionClass, RTI_SubscribeObjectClass, RTI_SyncAchieved, RTI_SyncPointReg, RTI_TimeAdvanceRequest, RTI_UnassociateForUpdates, RTI_UnpublishInteractionClass, RTI_UnpublishObjectClass, RTI_UnsubscribeInteractionClass, RTI_UnsubscribeObjectClass, RTI_UpdateAttributes
public abstract class RTI_RequestMessage
- extends com.lbf.commons.messaging.RequestMessage
This class should be the parent class of all request messages that start at the federate and
are sent to the RTI. It contains a String member that identifies the federate where the request
originated.
IMPLEMENTATION NOTE: Although this class *doesn't* implement java.io.Externalizable
, it does provide implementations of the required methods so that subclasses can call
them if they want to (thus removing the need to handle the parent class data). It also
implements private writeObject and readObject methods for faster serialization where a child
class is not Externalizable.
- See Also:
- Serialized Form
Methods inherited from class com.lbf.commons.messaging.RequestMessage |
getIdentifier, toString |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
targetFederate
protected String targetFederate
timestamp
protected double timestamp
RTI_RequestMessage
protected RTI_RequestMessage()
getTargetFederate
public String getTargetFederate()
setTargetFederate
public void setTargetFederate(String targetFederate)
isTimestamped
public boolean isTimestamped()
- This method will return true if the current timestamp is not equal to
PorticoConstants.NULL_TIME
. If it is equal to that value, the message is not meant
to be timestamped (thus, false will be returned).
getTimestamp
public double getTimestamp()
- This method will return the current timestamp value for this message. By default it will
return
PorticoConstants.NULL_TIME
. If you want a message to no longer have a
timestamp, you should call setTimestamp(PorticoConstants.NULL_TIME)
.
setTimestamp
public void setTimestamp(double timestamp)
writeObject
private void writeObject(ObjectOutputStream oos)
throws IOException
- Throws:
IOException
readObject
private void readObject(ObjectInputStream ois)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
readExternal
public void readExternal(ObjectInput input)
throws IOException,
ClassNotFoundException
- Overrides:
readExternal
in class com.lbf.commons.messaging.RequestMessage
- Throws:
IOException
ClassNotFoundException
writeExternal
public void writeExternal(ObjectOutput output)
throws IOException
- Overrides:
writeExternal
in class com.lbf.commons.messaging.RequestMessage
- Throws:
IOException
bytesToString
protected String bytesToString(byte[] bytes)
stringToBytes
protected byte[] stringToBytes(String string)