org.eodisp.hla.crc
Class Crc

java.lang.Object
  extended by org.eodisp.hla.crc.Crc

@ThreadSafe
public class Crc
extends java.lang.Object

This class implements the basic functionality of the Central RTI Component (RTI).

Version:
$Id: Crc.java 4379 2006-11-02 00:36:39Z ibirrer $
Author:
ibirrer

Field Summary
(package private) static org.apache.log4j.Logger logger
          Log4J logger for this class
 
Constructor Summary
Crc()
           
 
Method Summary
(package private)  FederationExecution createFederationExecution(java.lang.String federationExecutionName, byte[] fdd)
          Creates a new federation execution.
(package private)  void destroyAllFederationExecutions()
          Deprecated. Use for testing only!
(package private)  void destroyFederationExecution(java.lang.String federationExecutionName)
          Implements HLA service 4.3 (See IEEE Std 1516.1-2000).
(package private)  FederationExecution getFederationExecution(java.lang.String federationExecutionName)
          Returns the federation execution with the given name.
(package private)  LrcRemote getLrcRemote(LrcHandle lrcHandle)
           
(package private)  FederateHandle joinFederationExecution(java.lang.String federationExecutionName, java.lang.String federateType, LrcHandle lrcHandle, MobileFederateServices serviceReferences)
           
(package private)  LrcHandle registerLrc(LrcRemote lrcRemote)
           
(package private)  void reset()
          Deprecated. Use for testing only!
(package private)  void unregisterLrc(LrcHandle lrcHandle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static org.apache.log4j.Logger logger
Log4J logger for this class

Constructor Detail

Crc

public Crc()
Method Detail

createFederationExecution

FederationExecution createFederationExecution(java.lang.String federationExecutionName,
                                              byte[] fdd)
                                        throws FederationExecutionAlreadyExists,
                                               ErrorReadingFDD
Creates a new federation execution. Implements HLA service 4.2 (See IEEE Std 1516.1-2000).

Parameters:
federationExecutionName - the name of the federation execution
fdd - the federation object model (FOM)
Returns:
a reference to the new federation execution
Throws:
FederationExecutionAlreadyExists - if a federation execution with the same name has been created before
ErrorReadingFDD - if the given FDD has errors.
java.lang.NullPointerException - if federationExecutionName or fdd is null.
java.rmi.server.ExportException
implementation priority
1

getFederationExecution

FederationExecution getFederationExecution(java.lang.String federationExecutionName)
Returns the federation execution with the given name.

Parameters:
federationExecutionName - the name of the federation execution
Returns:
the federation execution with the given name or null if there is no federation execution associated with the given name.

destroyFederationExecution

void destroyFederationExecution(java.lang.String federationExecutionName)
                          throws FederatesCurrentlyJoined,
                                 FederationExecutionDoesNotExist
Implements HLA service 4.3 (See IEEE Std 1516.1-2000).

Parameters:
federationExecutionName - the name of the federation execution to be destroyed
Throws:
FederatesCurrentlyJoined - if there are still federates joined to the the federation execution with the given name
FederationExecutionDoesNotExist - If a federation execution with the given name does not exist
implementation priority
1

joinFederationExecution

FederateHandle joinFederationExecution(java.lang.String federationExecutionName,
                                       java.lang.String federateType,
                                       LrcHandle lrcHandle,
                                       MobileFederateServices serviceReferences)
                                 throws FederationExecutionDoesNotExist
Throws:
FederationExecutionDoesNotExist

getLrcRemote

LrcRemote getLrcRemote(LrcHandle lrcHandle)
Parameters:
lrcHandle -
Returns:
users of this method should always check the return value for null!

registerLrc

LrcHandle registerLrc(LrcRemote lrcRemote)

unregisterLrc

void unregisterLrc(LrcHandle lrcHandle)

destroyAllFederationExecutions

void destroyAllFederationExecutions()
Deprecated. Use for testing only!

Destroys all federation executions. Use for testing only, it does not inform federates about destroying the federation executions but just clears the map of current federation executions!


reset

void reset()
Deprecated. Use for testing only!