copyright The Portico Project 2008.

org.portico.shared.msg
Class RTI_RegisterObject

java.lang.Object
  extended by com.lbf.commons.messaging.RequestMessage
      extended by org.portico.shared.msg.RTI_RequestMessage
          extended by org.portico.shared.msg.RTI_RegisterObject
All Implemented Interfaces:
Externalizable, Serializable

public class RTI_RegisterObject
extends RTI_RequestMessage
implements Externalizable

This message is a notification of a request to register an object instance. The desired name for the instance is supplied. If there is no preference for the name, the objectName field is null and the object name should be assigned by the RTI.

Optional region/attribute association data can be supplied to the message. If provided, the request will tell the RTI to automatically associate the provided attributes with the provided regions for updates. The two collections are "parallel" lists (like those passed to the RTI). That is, the attribute at position "x" in the attribute list relates to the attribute at position "x" in the region list. If no region data is supplied, these collection should be null (and the usesDDM() method will return false if this is the case).

See Also:
Serialized Form

Field Summary
private  ArrayList<Integer> attributes
           
private  int classHandle
           
private  String objectName
           
private  ArrayList<Integer> regionTokens
           
private static long serialVersionUID
           
 
Fields inherited from class org.portico.shared.msg.RTI_RequestMessage
targetFederate, timestamp
 
Constructor Summary
RTI_RegisterObject()
           
RTI_RegisterObject(int classHandle)
           
RTI_RegisterObject(int classHandle, int[] attributes, int[] regions)
           
RTI_RegisterObject(int classHandle, String objectName)
           
RTI_RegisterObject(int classHandle, String objectName, int[] attributes, int[] regions)
           
 
Method Summary
 ArrayList<Integer> getAttributes()
          Gets all the attributes that are to be associated with regions after the object registration.
 int getClassHandle()
           
 String getObjectName()
           
 ArrayList<Integer> getRegionTokens()
          Gets all the region tokens that are to be associated with attributes after the object registration.
 void readExternal(ObjectInput input)
           
 void setAttributes(ArrayList<Integer> attributes)
           
 void setClassHandle(int classHandle)
           
 void setObjectName(String objectName)
           
 void setRegionTokens(ArrayList<Integer> regionTokens)
           
 boolean usesDDM()
          Returns true if this message has associated DDM region information, false otherwise.
 void writeExternal(ObjectOutput output)
           
 
Methods inherited from class org.portico.shared.msg.RTI_RequestMessage
bytesToString, getTargetFederate, getTimestamp, isTimestamped, setTargetFederate, setTimestamp, stringToBytes
 
Methods inherited from class com.lbf.commons.messaging.RequestMessage
getIdentifier, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

classHandle

private int classHandle

objectName

private String objectName

attributes

private ArrayList<Integer> attributes

regionTokens

private ArrayList<Integer> regionTokens
Constructor Detail

RTI_RegisterObject

public RTI_RegisterObject()

RTI_RegisterObject

public RTI_RegisterObject(int classHandle)

RTI_RegisterObject

public RTI_RegisterObject(int classHandle,
                          String objectName)

RTI_RegisterObject

public RTI_RegisterObject(int classHandle,
                          int[] attributes,
                          int[] regions)

RTI_RegisterObject

public RTI_RegisterObject(int classHandle,
                          String objectName,
                          int[] attributes,
                          int[] regions)
Method Detail

getClassHandle

public int getClassHandle()

setClassHandle

public void setClassHandle(int classHandle)

getObjectName

public String getObjectName()

setObjectName

public void setObjectName(String objectName)

getAttributes

public ArrayList<Integer> getAttributes()
Gets all the attributes that are to be associated with regions after the object registration. If this message isn't the result of a DDM call, this will return null.


setAttributes

public void setAttributes(ArrayList<Integer> attributes)

getRegionTokens

public ArrayList<Integer> getRegionTokens()
Gets all the region tokens that are to be associated with attributes after the object registration. If this message isn't the result of a DDM camm, this will return null


setRegionTokens

public void setRegionTokens(ArrayList<Integer> regionTokens)

usesDDM

public boolean usesDDM()
Returns true if this message has associated DDM region information, false otherwise.


readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class RTI_RequestMessage
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class RTI_RequestMessage
Throws:
IOException

copyright The Portico Project 2008.