org.npsnet.xrti
Class XRTIExecutive

java.lang.Object
  extended byorg.npsnet.xrti.XRTIExecutive

class XRTIExecutive
extends java.lang.Object

The XRTI executive application. Acts as a central server for federations operating in client-server or hybrid modes.

Author:
Andrzej Kapolka, Stanislav Kozina

Field Summary
private  java.util.Properties configuration
          The list of configuration properties.
private  boolean debugModeEnabled
          Whether or not debug mode is enabled.
private  java.util.Vector executiveClientAmbassadors
          The list of ALL executive client ambassadors connected to XRTI.
private  java.util.HashMap federationExecutionNameAmbassadorMap
          Maps federation execution names to their corresponding ambassadors.
private  long handleCounter
          The global handle counter.
private  java.lang.Thread channelAcceptorThread
          The message channel acceptor thread.
private  boolean keepGoing
          The keep-going flag.
private  XRTIExecutiveMainWindow mainWindow
          Application's main window.
private  FederationExecutionAmbassador metaFederationAmbassador
          The meta-federation execution ambassador.
private  MetaFederationProxyAmbassador metaFederationProxyAmbassador
          The meta-federation proxy ambassador.
private  boolean useGUI
          Whether or not use graphical user interface.
 
Constructor Summary
XRTIExecutive(java.util.Properties pConfiguration, boolean useGUI)
          Constructor.
 
Method Summary
protected  long acquireHandles(long blockSize)
          Acquires a block of handles.
protected  boolean createFederationExecution(java.lang.String name, org.w3c.dom.Document fdd)
          Creates a new federation execution.
protected  void debug(java.lang.String message)
          Prints the specified message to the error stream if debug mode is enabled.
protected  void destroyFederationExecution(java.lang.String name)
          Destroys a federation execution (if there are no federates in it).
protected  FederationExecutionAmbassador getFederationExecutionAmbassador(java.lang.String name)
          Retrieves the federation execution ambassador corresponding to the execution with the specified name.
protected  java.util.HashMap getFederationExecutionNameAmbassadorMap()
          Returns the map with federation execution names and their corresponding ambassadors.
protected  FederationExecutionAmbassador getMetaFederationAmbassador()
          Returns the federation execution ambassador for the meta-federation execution.
static void main(java.lang.String[] args)
          Application entry point.
 void stop()
          Stops the executive process.
protected  void updateJoinedFederatesList()
          Updates the list of joined federates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configuration

private java.util.Properties configuration
The list of configuration properties.


keepGoing

private boolean keepGoing
The keep-going flag.


channelAcceptorThread

private java.lang.Thread channelAcceptorThread
The message channel acceptor thread.


handleCounter

private long handleCounter
The global handle counter.


metaFederationAmbassador

private FederationExecutionAmbassador metaFederationAmbassador
The meta-federation execution ambassador.


metaFederationProxyAmbassador

private MetaFederationProxyAmbassador metaFederationProxyAmbassador
The meta-federation proxy ambassador.


federationExecutionNameAmbassadorMap

private java.util.HashMap federationExecutionNameAmbassadorMap
Maps federation execution names to their corresponding ambassadors.


debugModeEnabled

private boolean debugModeEnabled
Whether or not debug mode is enabled.


useGUI

private boolean useGUI
Whether or not use graphical user interface.


mainWindow

private XRTIExecutiveMainWindow mainWindow
Application's main window.


executiveClientAmbassadors

private java.util.Vector executiveClientAmbassadors
The list of ALL executive client ambassadors connected to XRTI.

Constructor Detail

XRTIExecutive

public XRTIExecutive(java.util.Properties pConfiguration,
                     boolean useGUI)
Constructor.

Parameters:
pConfiguration - the list of configuration properties
Method Detail

debug

protected void debug(java.lang.String message)
Prints the specified message to the error stream if debug mode is enabled.

Parameters:
message - the message to print

getMetaFederationAmbassador

protected FederationExecutionAmbassador getMetaFederationAmbassador()
Returns the federation execution ambassador for the meta-federation execution.

Returns:
the meta-federation execution ambassador

acquireHandles

protected long acquireHandles(long blockSize)
Acquires a block of handles.

Parameters:
blockSize - the number of handles desired
Returns:
the first handle in the acquired block

createFederationExecution

protected boolean createFederationExecution(java.lang.String name,
                                            org.w3c.dom.Document fdd)
Creates a new federation execution.

Parameters:
name - the name of the federation execution to create
fdd - the parsed federation description document

destroyFederationExecution

protected void destroyFederationExecution(java.lang.String name)
Destroys a federation execution (if there are no federates in it).

Parameters:
name - the name of the federation execution to destroy

getFederationExecutionAmbassador

protected FederationExecutionAmbassador getFederationExecutionAmbassador(java.lang.String name)
Retrieves the federation execution ambassador corresponding to the execution with the specified name.

Parameters:
name - the name of the federation execution
Returns:
the federation execution ambassador, or null if no such ambassador exists

stop

public void stop()
Stops the executive process.


getFederationExecutionNameAmbassadorMap

protected java.util.HashMap getFederationExecutionNameAmbassadorMap()
Returns the map with federation execution names and their corresponding ambassadors.

Returns:
the map with federation execution names and their corresponding ambassadors

updateJoinedFederatesList

protected void updateJoinedFederatesList()
Updates the list of joined federates.


main

public static void main(java.lang.String[] args)
Application entry point.

Parameters:
args - the command line arguments