org.npsnet.xrti.proxies
Class HLAfederationProxy

java.lang.Object
  extended byorg.npsnet.xrti.utilities.ObjectInstanceProxy
      extended byorg.npsnet.xrti.proxies.HLAobjectRootProxy
          extended byorg.npsnet.xrti.proxies.HLAmanagerProxy
              extended byorg.npsnet.xrti.proxies.HLAfederationProxy
All Implemented Interfaces:
HLAfederation, HLAmanager, HLAobjectRoot

public class HLAfederationProxy
extends HLAmanagerProxy
implements HLAfederation

This object class shall contain RTI state variables relating to a federation execution. The RTI shall publish it and shall register one object instance for the federation execution. It shall not automatically update the values of the instance attributes; a joined federate shall use a Request Attribute Value Update service to obtain values for the instance attributes.

Author:
org.npsnet.xrti.utilities.ProxyCompiler

Field Summary
 
Fields inherited from class org.npsnet.xrti.utilities.ObjectInstanceProxy
autoFlushDisabled, classHandle, deleted, instanceHandle, name, rtiAmbassador
 
Constructor Summary
protected HLAfederationProxy(RTIambassador pRTIAmbassador, ObjectClassHandle pClassHandle)
          Constructor for object instance proxies created to represent new locally owned objects.
protected HLAfederationProxy(RTIambassador pRTIAmbassador, ObjectClassHandle pClassHandle, java.lang.String pName)
          Constructor for object instance proxies created to represent new locally owned objects.
protected HLAfederationProxy(RTIambassador pRTIAmbassador, ObjectInstanceHandle pInstanceHandle, ObjectClassHandle pClassHandle, java.lang.String pName)
          Constructor for object instance proxies created in response to discovered objects.
 
Method Summary
 void addHLAfederationListener(HLAfederationListener l)
          Adds a listener for attributes associated with the HLAfederation class.
protected  void getAttributeValuesToFlush(AttributeHandleValueMap ahvm, boolean superFlush)
          Places the attribute values to flush into the specified map.
 HLAswitch getHLAautoProvide()
          Returns the value of the HLAautoProvide attribute.
 HLAswitch getHLAconveyRegionDesignatorSets()
          Returns the value of the HLAconveyRegionDesignatorSets attribute.
 java.lang.String getHLAFDDID()
          Returns the value of the HLAFDDID attribute.
 byte[][] getHLAfederatesinFederation()
          Returns the value of the HLAfederatesinFederation attribute.
 java.lang.String getHLAfederationName()
          Returns the value of the HLAfederationName attribute.
 java.lang.String getHLAlastSaveName()
          Returns the value of the HLAlastSaveName attribute.
 byte[] getHLAlastSaveTime()
          Returns the value of the HLAlastSaveTime attribute.
 java.lang.String getHLAnextSaveName()
          Returns the value of the HLAnextSaveName attribute.
 byte[] getHLAnextSaveTime()
          Returns the value of the HLAnextSaveTime attribute.
 java.lang.String getHLARTIversion()
          Returns the value of the HLARTIversion attribute.
 void provideAttributeValueUpdate(AttributeHandleSet theAttributes, byte[] userSuppliedTag)
          Notifies the proxy that it should provide an update regarding a set of object attributes.
 void reflectAttributeValues(AttributeHandleValueMap theAttributes, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport)
          Notifies the proxy of changes to the state of an object instance.
 void removeHLAfederationListener(HLAfederationListener l)
          Removes a listener for attributes associated with the HLAfederation class.
 void setHLAautoProvide(HLAswitch pHLAautoProvide, byte[] userSuppliedTag)
          Sets the value of the HLAautoProvide attribute.
 void setHLAconveyRegionDesignatorSets(HLAswitch pHLAconveyRegionDesignatorSets, byte[] userSuppliedTag)
          Sets the value of the HLAconveyRegionDesignatorSets attribute.
 void setHLAFDDID(java.lang.String pHLAFDDID, byte[] userSuppliedTag)
          Sets the value of the HLAFDDID attribute.
 void setHLAfederatesinFederation(byte[][] pHLAfederatesinFederation, byte[] userSuppliedTag)
          Sets the value of the HLAfederatesinFederation attribute.
 void setHLAfederationName(java.lang.String pHLAfederationName, byte[] userSuppliedTag)
          Sets the value of the HLAfederationName attribute.
 void setHLAlastSaveName(java.lang.String pHLAlastSaveName, byte[] userSuppliedTag)
          Sets the value of the HLAlastSaveName attribute.
 void setHLAlastSaveTime(byte[] pHLAlastSaveTime, byte[] userSuppliedTag)
          Sets the value of the HLAlastSaveTime attribute.
 void setHLAnextSaveName(java.lang.String pHLAnextSaveName, byte[] userSuppliedTag)
          Sets the value of the HLAnextSaveName attribute.
 void setHLAnextSaveTime(byte[] pHLAnextSaveTime, byte[] userSuppliedTag)
          Sets the value of the HLAnextSaveTime attribute.
 void setHLARTIversion(java.lang.String pHLARTIversion, byte[] userSuppliedTag)
          Sets the value of the HLARTIversion attribute.
 
Methods inherited from class org.npsnet.xrti.proxies.HLAmanagerProxy
addHLAmanagerListener, removeHLAmanagerListener
 
Methods inherited from class org.npsnet.xrti.proxies.HLAobjectRootProxy
addHLAobjectRootListener, removeHLAobjectRootListener
 
Methods inherited from class org.npsnet.xrti.utilities.ObjectInstanceProxy
delete, equals, flushAttributeValues, flushAttributeValues, getAutoFlushDisabled, getClassHandle, getInstanceHandle, getName, hashCode, isDeleted, reflectAttributeValues, reflectAttributeValues, reflectAttributeValues, reflectAttributeValues, reflectAttributeValues, setAutoFlushDisabled, setDeleted, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.npsnet.xrti.proxies.HLAmanager
addHLAmanagerListener, removeHLAmanagerListener
 
Methods inherited from interface org.npsnet.xrti.proxies.HLAobjectRoot
addHLAobjectRootListener, removeHLAobjectRootListener
 

Constructor Detail

HLAfederationProxy

protected HLAfederationProxy(RTIambassador pRTIAmbassador,
                             ObjectInstanceHandle pInstanceHandle,
                             ObjectClassHandle pClassHandle,
                             java.lang.String pName)
                      throws RTIinternalError
Constructor for object instance proxies created in response to discovered objects.

Parameters:
pRTIAmbassador - the run-time infrastructure ambassador
pInstanceHandle - the object instance handle
pClassHandle - the object class handle
pName - the object name
Throws:
RTIinternalError - if an internal error occurred in the run-time infrastructure

HLAfederationProxy

protected HLAfederationProxy(RTIambassador pRTIAmbassador,
                             ObjectClassHandle pClassHandle)
                      throws ObjectClassNotDefined,
                             ObjectClassNotPublished,
                             FederateNotExecutionMember,
                             SaveInProgress,
                             RestoreInProgress,
                             RTIinternalError
Constructor for object instance proxies created to represent new locally owned objects. Automatically notifies the run-time infrastructure.

Parameters:
pRTIAmbassador - the run-time infrastructure ambassador
pClassHandle - the object class handle
Throws:
ObjectClassNotDefined - if the specified object class is not defined
ObjectClassNotPublished - if the specified object class is not published
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

HLAfederationProxy

protected HLAfederationProxy(RTIambassador pRTIAmbassador,
                             ObjectClassHandle pClassHandle,
                             java.lang.String pName)
                      throws ObjectClassNotDefined,
                             ObjectClassNotPublished,
                             IllegalName,
                             ObjectInstanceNameInUse,
                             FederateNotExecutionMember,
                             SaveInProgress,
                             RestoreInProgress,
                             RTIinternalError
Constructor for object instance proxies created to represent new locally owned objects. Automatically notifies the run-time infrastructure.

Parameters:
pRTIAmbassador - the run-time infrastructure ambassador
pClassHandle - the object class handle
pName - the object name
Throws:
ObjectClassNotDefined - if the specified object class is not defined
ObjectClassNotPublished - if the specified object class is not published
IllegalName - if the instance name has is illegal
ObjectInstanceNameInUse - if the instance name is already in use
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure
Method Detail

reflectAttributeValues

public void reflectAttributeValues(AttributeHandleValueMap theAttributes,
                                   byte[] userSuppliedTag,
                                   OrderType sentOrdering,
                                   TransportationType theTransport)
                            throws AttributeNotRecognized,
                                   AttributeNotSubscribed,
                                   FederateInternalError
Notifies the proxy of changes to the state of an object instance.

Overrides:
reflectAttributeValues in class HLAmanagerProxy
Parameters:
theAttributes - the map between attribute handles and the new values of the identified attributes
userSuppliedTag - a user-supplied tag associated with the state change
sentOrdering - the type of ordering with which the update was sent
theTransport - the type of transport associated with the update
Throws:
AttributeNotRecognized - if the attribute was not recognized
AttributeNotSubscribed - if the federate had not subscribed to the attribute
FederateInternalError - if an error occurs in the federate

provideAttributeValueUpdate

public void provideAttributeValueUpdate(AttributeHandleSet theAttributes,
                                        byte[] userSuppliedTag)
                                 throws AttributeNotRecognized,
                                        AttributeNotOwned,
                                        FederateInternalError
Notifies the proxy that it should provide an update regarding a set of object attributes.

Overrides:
provideAttributeValueUpdate in class HLAmanagerProxy
Parameters:
theAttributes - the set of attribute handles identifying the attributes that should be sent
userSuppliedTag - the user-supplied tag associated with the request
Throws:
AttributeNotRecognized - if an identified attribute was not recognized
AttributeNotOwned - if the federate did not own a specified attribute
FederateInternalError - if an error occurs in the federate

getAttributeValuesToFlush

protected void getAttributeValuesToFlush(AttributeHandleValueMap ahvm,
                                         boolean superFlush)
                                  throws RTIinternalError
Places the attribute values to flush into the specified map.

Overrides:
getAttributeValuesToFlush in class HLAmanagerProxy
Parameters:
ahvm - the attribute handle value map to populate
superFlush - if true provide updates for all attributes; if false, only provide updates for the modified ones
Throws:
RTIinternalError - if an internal error occurs in the run-time infrastructure

addHLAfederationListener

public void addHLAfederationListener(HLAfederationListener l)
Adds a listener for attributes associated with the HLAfederation class.

Specified by:
addHLAfederationListener in interface HLAfederation
Parameters:
l - the listener to remove

removeHLAfederationListener

public void removeHLAfederationListener(HLAfederationListener l)
Removes a listener for attributes associated with the HLAfederation class.

Specified by:
removeHLAfederationListener in interface HLAfederation
Parameters:
l - the listener to remove

setHLAfederationName

public void setHLAfederationName(java.lang.String pHLAfederationName,
                                 byte[] userSuppliedTag)
                          throws ObjectInstanceNotKnown,
                                 AttributeNotDefined,
                                 AttributeNotOwned,
                                 FederateNotExecutionMember,
                                 SaveInProgress,
                                 RestoreInProgress,
                                 RTIinternalError
Sets the value of the HLAfederationName attribute.

Specified by:
setHLAfederationName in interface HLAfederation
Parameters:
pHLAfederationName - the new attribute value
userSuppliedTag - a user-supplied tag to associate with the action
Throws:
ObjectInstanceNotKnown - if the object instance is unknown
AttributeNotDefined - if one of the attributes is undefined
AttributeNotOwned - if one of the attributes is not owned
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

getHLAfederationName

public java.lang.String getHLAfederationName()
Returns the value of the HLAfederationName attribute.

Specified by:
getHLAfederationName in interface HLAfederation
Returns:
the current attribute value

setHLAfederatesinFederation

public void setHLAfederatesinFederation(byte[][] pHLAfederatesinFederation,
                                        byte[] userSuppliedTag)
                                 throws ObjectInstanceNotKnown,
                                        AttributeNotDefined,
                                        AttributeNotOwned,
                                        FederateNotExecutionMember,
                                        SaveInProgress,
                                        RestoreInProgress,
                                        RTIinternalError
Sets the value of the HLAfederatesinFederation attribute.

Specified by:
setHLAfederatesinFederation in interface HLAfederation
Parameters:
pHLAfederatesinFederation - the new attribute value
userSuppliedTag - a user-supplied tag to associate with the action
Throws:
ObjectInstanceNotKnown - if the object instance is unknown
AttributeNotDefined - if one of the attributes is undefined
AttributeNotOwned - if one of the attributes is not owned
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

getHLAfederatesinFederation

public byte[][] getHLAfederatesinFederation()
Returns the value of the HLAfederatesinFederation attribute.

Specified by:
getHLAfederatesinFederation in interface HLAfederation
Returns:
the current attribute value

setHLARTIversion

public void setHLARTIversion(java.lang.String pHLARTIversion,
                             byte[] userSuppliedTag)
                      throws ObjectInstanceNotKnown,
                             AttributeNotDefined,
                             AttributeNotOwned,
                             FederateNotExecutionMember,
                             SaveInProgress,
                             RestoreInProgress,
                             RTIinternalError
Sets the value of the HLARTIversion attribute.

Specified by:
setHLARTIversion in interface HLAfederation
Parameters:
pHLARTIversion - the new attribute value
userSuppliedTag - a user-supplied tag to associate with the action
Throws:
ObjectInstanceNotKnown - if the object instance is unknown
AttributeNotDefined - if one of the attributes is undefined
AttributeNotOwned - if one of the attributes is not owned
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

getHLARTIversion

public java.lang.String getHLARTIversion()
Returns the value of the HLARTIversion attribute.

Specified by:
getHLARTIversion in interface HLAfederation
Returns:
the current attribute value

setHLAFDDID

public void setHLAFDDID(java.lang.String pHLAFDDID,
                        byte[] userSuppliedTag)
                 throws ObjectInstanceNotKnown,
                        AttributeNotDefined,
                        AttributeNotOwned,
                        FederateNotExecutionMember,
                        SaveInProgress,
                        RestoreInProgress,
                        RTIinternalError
Sets the value of the HLAFDDID attribute.

Specified by:
setHLAFDDID in interface HLAfederation
Parameters:
pHLAFDDID - the new attribute value
userSuppliedTag - a user-supplied tag to associate with the action
Throws:
ObjectInstanceNotKnown - if the object instance is unknown
AttributeNotDefined - if one of the attributes is undefined
AttributeNotOwned - if one of the attributes is not owned
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

getHLAFDDID

public java.lang.String getHLAFDDID()
Returns the value of the HLAFDDID attribute.

Specified by:
getHLAFDDID in interface HLAfederation
Returns:
the current attribute value

setHLAlastSaveName

public void setHLAlastSaveName(java.lang.String pHLAlastSaveName,
                               byte[] userSuppliedTag)
                        throws ObjectInstanceNotKnown,
                               AttributeNotDefined,
                               AttributeNotOwned,
                               FederateNotExecutionMember,
                               SaveInProgress,
                               RestoreInProgress,
                               RTIinternalError
Sets the value of the HLAlastSaveName attribute.

Specified by:
setHLAlastSaveName in interface HLAfederation
Parameters:
pHLAlastSaveName - the new attribute value
userSuppliedTag - a user-supplied tag to associate with the action
Throws:
ObjectInstanceNotKnown - if the object instance is unknown
AttributeNotDefined - if one of the attributes is undefined
AttributeNotOwned - if one of the attributes is not owned
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

getHLAlastSaveName

public java.lang.String getHLAlastSaveName()
Returns the value of the HLAlastSaveName attribute.

Specified by:
getHLAlastSaveName in interface HLAfederation
Returns:
the current attribute value

setHLAlastSaveTime

public void setHLAlastSaveTime(byte[] pHLAlastSaveTime,
                               byte[] userSuppliedTag)
                        throws ObjectInstanceNotKnown,
                               AttributeNotDefined,
                               AttributeNotOwned,
                               FederateNotExecutionMember,
                               SaveInProgress,
                               RestoreInProgress,
                               RTIinternalError
Sets the value of the HLAlastSaveTime attribute.

Specified by:
setHLAlastSaveTime in interface HLAfederation
Parameters:
pHLAlastSaveTime - the new attribute value
userSuppliedTag - a user-supplied tag to associate with the action
Throws:
ObjectInstanceNotKnown - if the object instance is unknown
AttributeNotDefined - if one of the attributes is undefined
AttributeNotOwned - if one of the attributes is not owned
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

getHLAlastSaveTime

public byte[] getHLAlastSaveTime()
Returns the value of the HLAlastSaveTime attribute.

Specified by:
getHLAlastSaveTime in interface HLAfederation
Returns:
the current attribute value

setHLAnextSaveName

public void setHLAnextSaveName(java.lang.String pHLAnextSaveName,
                               byte[] userSuppliedTag)
                        throws ObjectInstanceNotKnown,
                               AttributeNotDefined,
                               AttributeNotOwned,
                               FederateNotExecutionMember,
                               SaveInProgress,
                               RestoreInProgress,
                               RTIinternalError
Sets the value of the HLAnextSaveName attribute.

Specified by:
setHLAnextSaveName in interface HLAfederation
Parameters:
pHLAnextSaveName - the new attribute value
userSuppliedTag - a user-supplied tag to associate with the action
Throws:
ObjectInstanceNotKnown - if the object instance is unknown
AttributeNotDefined - if one of the attributes is undefined
AttributeNotOwned - if one of the attributes is not owned
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

getHLAnextSaveName

public java.lang.String getHLAnextSaveName()
Returns the value of the HLAnextSaveName attribute.

Specified by:
getHLAnextSaveName in interface HLAfederation
Returns:
the current attribute value

setHLAnextSaveTime

public void setHLAnextSaveTime(byte[] pHLAnextSaveTime,
                               byte[] userSuppliedTag)
                        throws ObjectInstanceNotKnown,
                               AttributeNotDefined,
                               AttributeNotOwned,
                               FederateNotExecutionMember,
                               SaveInProgress,
                               RestoreInProgress,
                               RTIinternalError
Sets the value of the HLAnextSaveTime attribute.

Specified by:
setHLAnextSaveTime in interface HLAfederation
Parameters:
pHLAnextSaveTime - the new attribute value
userSuppliedTag - a user-supplied tag to associate with the action
Throws:
ObjectInstanceNotKnown - if the object instance is unknown
AttributeNotDefined - if one of the attributes is undefined
AttributeNotOwned - if one of the attributes is not owned
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

getHLAnextSaveTime

public byte[] getHLAnextSaveTime()
Returns the value of the HLAnextSaveTime attribute.

Specified by:
getHLAnextSaveTime in interface HLAfederation
Returns:
the current attribute value

setHLAautoProvide

public void setHLAautoProvide(HLAswitch pHLAautoProvide,
                              byte[] userSuppliedTag)
                       throws ObjectInstanceNotKnown,
                              AttributeNotDefined,
                              AttributeNotOwned,
                              FederateNotExecutionMember,
                              SaveInProgress,
                              RestoreInProgress,
                              RTIinternalError
Sets the value of the HLAautoProvide attribute.

Specified by:
setHLAautoProvide in interface HLAfederation
Parameters:
pHLAautoProvide - the new attribute value
userSuppliedTag - a user-supplied tag to associate with the action
Throws:
ObjectInstanceNotKnown - if the object instance is unknown
AttributeNotDefined - if one of the attributes is undefined
AttributeNotOwned - if one of the attributes is not owned
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

getHLAautoProvide

public HLAswitch getHLAautoProvide()
Returns the value of the HLAautoProvide attribute.

Specified by:
getHLAautoProvide in interface HLAfederation
Returns:
the current attribute value

setHLAconveyRegionDesignatorSets

public void setHLAconveyRegionDesignatorSets(HLAswitch pHLAconveyRegionDesignatorSets,
                                             byte[] userSuppliedTag)
                                      throws ObjectInstanceNotKnown,
                                             AttributeNotDefined,
                                             AttributeNotOwned,
                                             FederateNotExecutionMember,
                                             SaveInProgress,
                                             RestoreInProgress,
                                             RTIinternalError
Sets the value of the HLAconveyRegionDesignatorSets attribute.

Specified by:
setHLAconveyRegionDesignatorSets in interface HLAfederation
Parameters:
pHLAconveyRegionDesignatorSets - the new attribute value
userSuppliedTag - a user-supplied tag to associate with the action
Throws:
ObjectInstanceNotKnown - if the object instance is unknown
AttributeNotDefined - if one of the attributes is undefined
AttributeNotOwned - if one of the attributes is not owned
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

getHLAconveyRegionDesignatorSets

public HLAswitch getHLAconveyRegionDesignatorSets()
Returns the value of the HLAconveyRegionDesignatorSets attribute.

Specified by:
getHLAconveyRegionDesignatorSets in interface HLAfederation
Returns:
the current attribute value