Package org.see.skf.core
Interface SKFederateInterface
- All Known Implementing Classes:
SEEAbstractFederate,SEELateJoinerFederate,SKBaseFederate
public interface SKFederateInterface
The base interface that for all Starter Kit federates. The primary provisions for federate implementations
are the management of objects and interactions.
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddInteractionListener(InteractionListener listener) Register an interaction listener to be notified about the dispatch of interactions in the federation execution.voidRegister a remote object instance listener to be notified about the initialization of remote object instances created by another federate.voidconnectToRTI(hla.rti1516_2025.RtiConfiguration rtiConfig) Connect the federate to the RTI.voiddeleteObjectInstance(Object objectInstance, boolean relinquishNameReservation) Delete the object instance from the RTI.voidJoin the federation execution.voidpublishInteractionClass(Class<?> interactionClass) Declare to the RTI that interactions of the specified HLA interaction class will be published by the federate.voidpublishObjectClass(Class<?> objectClass) Declare to the RTI that attribute information about the instances of the specified HLA object class will be published by the federate.queryRemoteObjectInstance(String instanceName) Finds the representation of a remote object instance if previously discovered and stored by the federate.registerObjectInstance(Object objectInstance) Create an instance of an HLA object class that will be published by the federate.registerObjectInstance(Object objectInstance, String requestedName) Create a named instance of an HLA object class that will be published by the federate.voidremoveInteractionListener(InteractionListener listener) Remove a previously registered interaction listener to stop receiving events when interactions are sent.voidRegister a remote object instance listener to be notified about the deletion of remote object instances.voidGracefully resign from the federation execution.booleansendInteraction(Object interaction) Send an interaction of an HLA interaction class that has been previously declared as publishable by the federate to the RTI.voidsubscribeInteractionClass(Class<?> interactionClass) Declare to the RTI that the federate wants to stop receiving interactions of the specified HLA interaction class.voidsubscribeObjectClass(Class<?> objectClass) Declare to the RTI that the federate will subscribe to instance updates of the specified HLA object class.voidunpublishInteractionClass(Class<?> interactionClass) Declare to the RTI that the federate will subscribe to interactions of the specified HLA interaction class.voidunpublishObjectClass(Class<?> objectClass) Declare to the RTI that all information about instances of a previously published object class will no longer be sent by the federate.voidunsubscribeInteractionClass(Class<?> interactionClass) Declare to the RTI that interactions of a previously published HLA interaction class will no longer be sent by the federate.voidunsubscribeObjectClass(Class<?> objectClass) Declare to the RTI that the federate wants to stop receiving updates about the instances of the specified HLA object class.voidupdateObjectInstance(Object objectInstance) Issue an update in the instance's attributes to the RTI for other federates to receive.
-
Method Details
-
connectToRTI
void connectToRTI(hla.rti1516_2025.RtiConfiguration rtiConfig) throws hla.rti1516_2025.exceptions.CallNotAllowedFromWithinCallback, hla.rti1516_2025.exceptions.Unauthorized, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.ConnectionFailed, hla.rti1516_2025.exceptions.UnsupportedCallbackModel Connect the federate to the RTI. In HLA 4, the local_settings_designator string has been supplanted by the RTIConfiguration class that encapsulates the information needed to connect to the RTI.- Parameters:
rtiConfig- An RTI configuration object.- Throws:
hla.rti1516_2025.exceptions.CallNotAllowedFromWithinCallbackhla.rti1516_2025.exceptions.Unauthorizedhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.ConnectionFailedhla.rti1516_2025.exceptions.UnsupportedCallbackModel
-
joinFederationExecution
void joinFederationExecution() throws hla.rti1516_2025.exceptions.ErrorReadingFOM, hla.rti1516_2025.exceptions.CouldNotCreateLogicalTimeFactory, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.CallNotAllowedFromWithinCallback, hla.rti1516_2025.exceptions.InconsistentFOM, hla.rti1516_2025.exceptions.FederationExecutionDoesNotExist, hla.rti1516_2025.exceptions.Unauthorized, hla.rti1516_2025.exceptions.CouldNotOpenFOM, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.InvalidFOM, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.SaveInProgress, hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.AsynchronousDeliveryAlreadyEnabledJoin the federation execution.- Throws:
hla.rti1516_2025.exceptions.ErrorReadingFOMhla.rti1516_2025.exceptions.CouldNotCreateLogicalTimeFactoryhla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.CallNotAllowedFromWithinCallbackhla.rti1516_2025.exceptions.InconsistentFOMhla.rti1516_2025.exceptions.FederationExecutionDoesNotExisthla.rti1516_2025.exceptions.Unauthorizedhla.rti1516_2025.exceptions.CouldNotOpenFOMhla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.InvalidFOMhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.SaveInProgresshla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.AsynchronousDeliveryAlreadyEnabled
-
resignFederationExecution
void resignFederationExecution() throws hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.SaveInProgress, hla.rti1516_2025.exceptions.CallNotAllowedFromWithinCallback, hla.rti1516_2025.exceptions.InvalidResignAction, hla.rti1516_2025.exceptions.OwnershipAcquisitionPending, hla.rti1516_2025.exceptions.FederateOwnsAttributes, hla.rti1516_2025.exceptions.FederateIsExecutionMemberGracefully resign from the federation execution.- Throws:
hla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.SaveInProgresshla.rti1516_2025.exceptions.CallNotAllowedFromWithinCallbackhla.rti1516_2025.exceptions.InvalidResignActionhla.rti1516_2025.exceptions.OwnershipAcquisitionPendinghla.rti1516_2025.exceptions.FederateOwnsAttributeshla.rti1516_2025.exceptions.FederateIsExecutionMember
-
publishObjectClass
void publishObjectClass(Class<?> objectClass) throws hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.NameNotFound, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.InvalidObjectClassHandle, hla.rti1516_2025.exceptions.AttributeNotDefined, hla.rti1516_2025.exceptions.ObjectClassNotDefined, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.SaveInProgress Declare to the RTI that attribute information about the instances of the specified HLA object class will be published by the federate.- Parameters:
objectClass- The Java class representation of the HLA object class.- Throws:
hla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.NameNotFoundhla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.InvalidObjectClassHandlehla.rti1516_2025.exceptions.AttributeNotDefinedhla.rti1516_2025.exceptions.ObjectClassNotDefinedhla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.SaveInProgress
-
unpublishObjectClass
void unpublishObjectClass(Class<?> objectClass) throws hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.ObjectClassNotDefined, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.OwnershipAcquisitionPending, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.SaveInProgress, hla.rti1516_2025.exceptions.AttributeNotDefined Declare to the RTI that all information about instances of a previously published object class will no longer be sent by the federate. Does nothing if the HLA object class has not been published by the federate beforehand.- Parameters:
objectClass- The Java class representation of the HLA object class.- Throws:
hla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.ObjectClassNotDefinedhla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.OwnershipAcquisitionPendinghla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.SaveInProgresshla.rti1516_2025.exceptions.AttributeNotDefined- See Also:
-
subscribeObjectClass
void subscribeObjectClass(Class<?> objectClass) throws hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.NameNotFound, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.InvalidObjectClassHandle, hla.rti1516_2025.exceptions.AttributeNotDefined, hla.rti1516_2025.exceptions.ObjectClassNotDefined, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.SaveInProgress Declare to the RTI that the federate will subscribe to instance updates of the specified HLA object class.- Parameters:
objectClass- The Java class representation of the HLA object class.- Throws:
hla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.NameNotFoundhla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.InvalidObjectClassHandlehla.rti1516_2025.exceptions.AttributeNotDefinedhla.rti1516_2025.exceptions.ObjectClassNotDefinedhla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.SaveInProgress
-
unsubscribeObjectClass
void unsubscribeObjectClass(Class<?> objectClass) throws hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.AttributeNotDefined, hla.rti1516_2025.exceptions.ObjectClassNotDefined, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.SaveInProgress Declare to the RTI that the federate wants to stop receiving updates about the instances of the specified HLA object class. Does nothing is the object class was not subscribed to beforehand.- Parameters:
objectClass- The Java class representation of the HLA object class.- Throws:
hla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.AttributeNotDefinedhla.rti1516_2025.exceptions.ObjectClassNotDefinedhla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.SaveInProgress- See Also:
-
publishInteractionClass
void publishInteractionClass(Class<?> interactionClass) throws hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.NameNotFound, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.InvalidInteractionClassHandle, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.InteractionClassNotDefined, hla.rti1516_2025.exceptions.SaveInProgress Declare to the RTI that interactions of the specified HLA interaction class will be published by the federate.- Parameters:
interactionClass- The Java class representation of the HLA interaction class.- Throws:
hla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.NameNotFoundhla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.InvalidInteractionClassHandlehla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.InteractionClassNotDefinedhla.rti1516_2025.exceptions.SaveInProgress
-
unpublishInteractionClass
void unpublishInteractionClass(Class<?> interactionClass) throws hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.InteractionClassNotDefined, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.SaveInProgress Declare to the RTI that the federate will subscribe to interactions of the specified HLA interaction class. Does nothing if the interaction class was not published beforehand.- Parameters:
interactionClass- The Java class representation of the HLA interaction class.- Throws:
hla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.InteractionClassNotDefinedhla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.SaveInProgress- See Also:
-
subscribeInteractionClass
void subscribeInteractionClass(Class<?> interactionClass) throws hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.NameNotFound, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.InvalidInteractionClassHandle, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.InteractionClassNotDefined, hla.rti1516_2025.exceptions.SaveInProgress, hla.rti1516_2025.exceptions.FederateServiceInvocationsAreBeingReportedViaMOM Declare to the RTI that the federate wants to stop receiving interactions of the specified HLA interaction class. Does nothing if the interaction class was not subscribed to beforehand.- Parameters:
interactionClass- The Java class representation of the HLA interaction class.- Throws:
hla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.NameNotFoundhla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.InvalidInteractionClassHandlehla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.InteractionClassNotDefinedhla.rti1516_2025.exceptions.SaveInProgresshla.rti1516_2025.exceptions.FederateServiceInvocationsAreBeingReportedViaMOM
-
unsubscribeInteractionClass
void unsubscribeInteractionClass(Class<?> interactionClass) throws hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.InteractionClassNotDefined, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.SaveInProgress Declare to the RTI that interactions of a previously published HLA interaction class will no longer be sent by the federate.- Parameters:
interactionClass- The Java class representation of the HLA interaction class.- Throws:
hla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.InteractionClassNotDefinedhla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.SaveInProgress
-
registerObjectInstance
String registerObjectInstance(Object objectInstance) throws hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.ObjectClassNotPublished, hla.rti1516_2025.exceptions.ObjectClassNotDefined, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.ObjectInstanceNotKnown, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.SaveInProgress Create an instance of an HLA object class that will be published by the federate.
The HLA object class that this instance belongs to must have been previously declared as publishable to the RTI.- Parameters:
objectInstance- An object with attributes aligned with the attributes of its HLA object class equivalent in the FOM.- Returns:
- The name of the object instance assigned by the RTI.
- Throws:
hla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.ObjectClassNotPublishedhla.rti1516_2025.exceptions.ObjectClassNotDefinedhla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.ObjectInstanceNotKnownhla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.SaveInProgress- See Also:
-
registerObjectInstance
String registerObjectInstance(Object objectInstance, String requestedName) throws hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.IllegalName, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.SaveInProgress, hla.rti1516_2025.exceptions.ObjectClassNotPublished, hla.rti1516_2025.exceptions.ObjectClassNotDefined, hla.rti1516_2025.exceptions.ObjectInstanceNotKnown, hla.rti1516_2025.exceptions.ObjectInstanceNameInUse, hla.rti1516_2025.exceptions.ObjectInstanceNameNotReserved Create a named instance of an HLA object class that will be published by the federate. It should be noted that there is no guarantee the federate will be able to reserve the provided name. If this happens, the RTI will assign a unique name of its own, which wil be returned by the method for your reference.
The HLA object class that this instance belongs to must have been previously declared as publishable to the RTI.- Parameters:
objectInstance- An object with attributes aligned with the attributes of its HLA object class equivalent in the FOM.requestedName- The requestedName for the object instance.- Returns:
- The name of the object instance at the RTI.
- Throws:
hla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.IllegalNamehla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.SaveInProgresshla.rti1516_2025.exceptions.ObjectClassNotPublishedhla.rti1516_2025.exceptions.ObjectClassNotDefinedhla.rti1516_2025.exceptions.ObjectInstanceNotKnownhla.rti1516_2025.exceptions.ObjectInstanceNameInUsehla.rti1516_2025.exceptions.ObjectInstanceNameNotReserved- See Also:
-
updateObjectInstance
Issue an update in the instance's attributes to the RTI for other federates to receive. The HLA object class must have already been declared as publishable by the federate to the RTI beforehand AND the object must have been previously created.- Parameters:
objectInstance- The object instance representation to be updated.- See Also:
-
deleteObjectInstance
void deleteObjectInstance(Object objectInstance, boolean relinquishNameReservation) throws hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.ObjectInstanceNotKnown, hla.rti1516_2025.exceptions.DeletePrivilegeNotHeld, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.SaveInProgress, hla.rti1516_2025.exceptions.ObjectInstanceNameNotReserved Delete the object instance from the RTI. The HLA object class that the instance belongs to must have already been declared as publishable by the federate to the RTI beforehand AND the object must have previously been created. It is possible to choose whether to release the name of the object instance if it uses a custom name that had to be reserved at the time of creation.- Parameters:
objectInstance- The object instance representation to be deleted.relinquishNameReservation- true/false to release ownership of the instance name if reserved.- Throws:
hla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.ObjectInstanceNotKnownhla.rti1516_2025.exceptions.DeletePrivilegeNotHeldhla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.SaveInProgresshla.rti1516_2025.exceptions.ObjectInstanceNameNotReserved- See Also:
-
queryRemoteObjectInstance
Finds the representation of a remote object instance if previously discovered and stored by the federate.- Parameters:
instanceName- Name of the object instance to look for.- Returns:
- The object representing the HLA object instance or null if not found.
-
sendInteraction
boolean sendInteraction(Object interaction) throws hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.InteractionParameterNotDefined, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.InteractionClassNotDefined, hla.rti1516_2025.exceptions.InteractionClassNotPublished, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.SaveInProgress Send an interaction of an HLA interaction class that has been previously declared as publishable by the federate to the RTI. The HLA interaction class must have already been declared as publishable by the federate to the RTI beforehand.- Parameters:
interaction- An object with attributes aligned with the parameters of its HLA interaction class equivalent in the FOM.- Returns:
- true/false depending on the operation's success.
- Throws:
hla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.InteractionParameterNotDefinedhla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.InteractionClassNotDefinedhla.rti1516_2025.exceptions.InteractionClassNotPublishedhla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.SaveInProgress- See Also:
-
addRemoteObjectInstanceListener
Register a remote object instance listener to be notified about the initialization of remote object instances created by another federate.- Parameters:
listener- The remote object instance listener to be added.
-
removeRemoteObjectInstanceListener
Register a remote object instance listener to be notified about the deletion of remote object instances.- Parameters:
listener- The remote object instance listener to be removed.
-
addInteractionListener
Register an interaction listener to be notified about the dispatch of interactions in the federation execution.- Parameters:
listener- The interaction listener.
-
removeInteractionListener
Remove a previously registered interaction listener to stop receiving events when interactions are sent.- Parameters:
listener- The interaction listener.
-