cz.zcu.fav.kiv.jsim.hla
Class JSimHLARemoteProcess

java.lang.Object
  extended bycz.zcu.fav.kiv.jsim.hla.JSimHLARemoteProcess
All Implemented Interfaces:
JSimHLAProcess

public class JSimHLARemoteProcess
extends java.lang.Object
implements JSimHLAProcess

JSimHLARemoteProcess represents HLA remote object for JSimProcess. Instance of JSimProcess with the same name must exist in another federate. All methods of this class have the same function as methods defined in JSimProcess.

Author:
Stanislav Kozina
See Also:
JSimProcess

Constructor Summary
JSimHLARemoteProcess(java.lang.String name, JSimHLASimulation parent)
          Creates a new HLA remote process.
 
Method Summary
 void activate(double when)
          Activates a process at the given time.
 void cancel()
          Deletes all process's scheduled events from the calendar.
 java.lang.String getName()
          Returns the process's name.
 int getState()
          Returns the process's state.
 boolean isIdle()
          Returns true if the process is idle, false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSimHLARemoteProcess

public JSimHLARemoteProcess(java.lang.String name,
                            JSimHLASimulation parent)
                     throws JSimInvalidParametersException,
                            JSimSimulationAlreadyTerminatedException
Creates a new HLA remote process. Instance of JSimProcess with the same name must exist in another federate.

Parameters:
name - Name of the remote process.
parent - Parent simulation.
Throws:
JSimSimulationAlreadyTerminatedException - This exception is thrown out if the simulation has already been terminated.
JSimInvalidParametersException - This exception is thrown out if no parent was specified.
Method Detail

getName

public java.lang.String getName()
Returns the process's name.

Returns:
The process's name.

activate

public void activate(double when)
              throws JSimSecurityException,
                     JSimInvalidParametersException
Activates a process at the given time.

Specified by:
activate in interface JSimHLAProcess
Parameters:
when - Absolute simulation time when the process should be activated.
Throws:
JSimSecurityException
JSimInvalidParametersException

cancel

public void cancel()
            throws JSimSecurityException
Deletes all process's scheduled events from the calendar.

Specified by:
cancel in interface JSimHLAProcess
Throws:
JSimSecurityException

getState

public int getState()
Returns the process's state.

Specified by:
getState in interface JSimHLAProcess
Returns:
The process's state.

isIdle

public boolean isIdle()
Returns true if the process is idle, false otherwise.

Specified by:
isIdle in interface JSimHLAProcess
Returns:
True if the process is idle, false otherwise.