copyright The Portico Project 2008.

org.portico.impl.hla13
Class ImplJava1Helper

java.lang.Object
  extended by org.portico.impl.hla13.ImplJava1Helper
All Implemented Interfaces:
ISpecHelper

public class ImplJava1Helper
extends Object
implements ISpecHelper

This class helps provides helper methods to the DefaultJava1RTIAmbassador class and helps bridge the gap between the Portico compatibility layer and the HLA 1.3 Annex A interface. The basic thrust of this class (like all ISpecHelper implementations) is that it provides the necessary facilities to turn HLA-interface-specific code into Portico-clean, interface independant code.

To maintain the independence of Portico from any particular HLA interface specification, this is one of the *ONLY* classes that is allowed to have classes from the hla.rti namespace in it. All other classes should use the facilities provided by the org.portico.shared.compat package


Field Summary
private  hla.rti13.java1.FederateAmbassador fedamb
           
private  LRC lrc
           
private  LRCState state
           
 
Constructor Summary
ImplJava1Helper()
           
 
Method Summary
 void checkAccess()
          Check to see if we are currently ticking (and thus not able to make an RTI callback).
 void checkAdvancing()
          Check to see if we are advancing.
 void checkJoined()
          This method checks to see if the federate associated with this LRC is joined to a federation.
 void checkRestore()
           
 void checkSave()
           
 void checkSyncAnnounced(String label)
          Checks to see if the given synchronization point label has been announced
 void checkTimeConstrained()
          Check to see if there is a time constrained enable pending.
 void checkTimeRegulation()
          Check to see if there is a time regulation enable pending.
 void checkValidTime(double time)
          Validate that the given time is valid for the current state (that it is equal to or greater than the current LBTS for this federate).
 hla.rti13.java1.FederateAmbassador getFederateAmbassador()
           
 ObjectModel getFOM()
           
 org.apache.log4j.Logger getLRCLogger()
           
 LRCState getState()
           
 void processMessage(com.lbf.commons.messaging.MessageContext context)
           
 void setFederateAmbassador(hla.rti13.java1.FederateAmbassador fedamb)
           
 void tick()
           
 void tick(double min, double max)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lrc

private LRC lrc

state

private LRCState state

fedamb

private hla.rti13.java1.FederateAmbassador fedamb
Constructor Detail

ImplJava1Helper

public ImplJava1Helper()
                throws hla.rti13.java1.RTIinternalError
Throws:
hla.rti13.java1.RTIinternalError
Method Detail

processMessage

public void processMessage(com.lbf.commons.messaging.MessageContext context)
                    throws Exception
Throws:
Exception

getState

public LRCState getState()

getFOM

public ObjectModel getFOM()

tick

public void tick()
          throws hla.rti13.java1.ConcurrentAccessAttempted,
                 hla.rti13.java1.RTIinternalError
Throws:
hla.rti13.java1.ConcurrentAccessAttempted
hla.rti13.java1.RTIinternalError

tick

public void tick(double min,
                 double max)
          throws hla.rti13.java1.ConcurrentAccessAttempted,
                 hla.rti13.java1.RTIinternalError
Throws:
hla.rti13.java1.ConcurrentAccessAttempted
hla.rti13.java1.RTIinternalError

checkAccess

public void checkAccess()
                 throws hla.rti13.java1.ConcurrentAccessAttempted
Check to see if we are currently ticking (and thus not able to make an RTI callback). If we are currently ticking, a ConcurrentAccessAttempted will be thrown.

Throws:
hla.rti13.java1.ConcurrentAccessAttempted

checkAdvancing

public void checkAdvancing()
                    throws hla.rti13.java1.TimeAdvanceAlreadyInProgress
Check to see if we are advancing. If we are, throw an exception.

Throws:
hla.rti13.java1.TimeAdvanceAlreadyInProgress

checkTimeRegulation

public void checkTimeRegulation()
                         throws hla.rti13.java1.EnableTimeRegulationPending
Check to see if there is a time regulation enable pending. If there is, throw an exception

Throws:
hla.rti13.java1.EnableTimeRegulationPending

checkTimeConstrained

public void checkTimeConstrained()
                          throws hla.rti13.java1.EnableTimeConstrainedPending
Check to see if there is a time constrained enable pending. If there is, throw an exception

Throws:
hla.rti13.java1.EnableTimeConstrainedPending

checkValidTime

public void checkValidTime(double time)
                    throws hla.rti13.java1.InvalidFederationTime
Validate that the given time is valid for the current state (that it is equal to or greater than the current LBTS for this federate).

Throws:
hla.rti13.java1.InvalidFederationTime

checkSave

public void checkSave()
               throws hla.rti13.java1.SaveInProgress
Throws:
hla.rti13.java1.SaveInProgress

checkRestore

public void checkRestore()
                  throws hla.rti13.java1.RestoreInProgress
Throws:
hla.rti13.java1.RestoreInProgress

checkJoined

public void checkJoined()
                 throws hla.rti13.java1.FederateNotExecutionMember
This method checks to see if the federate associated with this LRC is joined to a federation. If it is not, a FederateNotExecutionMember exception is thrown.

Throws:
hla.rti13.java1.FederateNotExecutionMember

checkSyncAnnounced

public void checkSyncAnnounced(String label)
                        throws hla.rti13.java1.SynchronizationPointLabelWasNotAnnounced
Checks to see if the given synchronization point label has been announced

Throws:
hla.rti13.java1.SynchronizationPointLabelWasNotAnnounced

getFederateAmbassador

public hla.rti13.java1.FederateAmbassador getFederateAmbassador()

setFederateAmbassador

public void setFederateAmbassador(hla.rti13.java1.FederateAmbassador fedamb)

getLRCLogger

public org.apache.log4j.Logger getLRCLogger()

copyright The Portico Project 2008.