|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ModelManagerRemote
The remote interface of the model manager. This remote interface is used by the simulation manager to control federates on the model manager that shall participate in a federation execution.
Field Summary | |
---|---|
static int |
LOCK_TIMEOUT
This is the time specifying how long a lock for a federate is valid. |
static java.lang.String |
REGISTRY_NAME
|
Method Summary | |
---|---|
FederateProcessHandle |
lockFederate(java.lang.String simulationManagerId,
java.lang.String experimentName,
java.lang.String federateId,
java.lang.String federateVersion)
Locks the federate with the given Id and version so that it is ready to be started by the calling simulation manager. |
boolean |
startFederate(FederateProcessHandle handle,
java.net.URI crc,
java.lang.String federationExecutionName,
FileInitData[] fileInitData)
Starts the federate that was previously locked using #lockFederate(String, String) }. |
boolean |
stopFederate(FederateProcessHandle federateProcessHandle)
Stops the federate (process) with the given federate process handle. |
void |
updateLock(FederateProcessHandle handle)
Updates a lock of a previously fetched handle. |
Field Detail |
---|
static final java.lang.String REGISTRY_NAME
static final int LOCK_TIMEOUT
updateLock(FederateProcessHandle)
,
Constant Field ValuesMethod Detail |
---|
FederateProcessHandle lockFederate(java.lang.String simulationManagerId, java.lang.String experimentName, java.lang.String federateId, java.lang.String federateVersion) throws FederateNotKnownException, FederateAccessException, java.rmi.RemoteException
#startFederate(FederateProcessHandle, URI, String, Map)
throws a
FederateStartException
.
simulationManagerId
- the ID of the simulation manager that wants to lock a
federate.experimentName
- the name of the experimentfederateId
- The ID of the federate that shall be started. This ID should
be based on the reverse domain name convention (example:
org.eodisp.example.rocket
)federateVersion
- The version must have the following form:
version ::= major( '.' minor ( '.' micro ( '.' qualifier )? )? )? major ::= number minor ::= number micro ::= number qualifier ::= ( alphanum | '_' | '-' )+(copied from the OSGI standard)
null
if the federate is already locked. Always
returns a new handle if a federate can be started multiple times.
FederateNotKnownException
- thrown if the federate with the given federateId
and version
is not known on the model manager.
java.rmi.RemoteException
- RMI remote exception happened while calling this method.
FederateAccessException
boolean startFederate(FederateProcessHandle handle, java.net.URI crc, java.lang.String federationExecutionName, FileInitData[] fileInitData) throws FederateStartException, java.rmi.RemoteException
#lockFederate(String, String)
}. This method also allows to send
initialization data to the federate.
handle
- A handle identifying a previously locked federate process.crc
- URI of the CRC that the newly started federate shall connect
tofederationExecutionName
- the name of the federation execution that the federate shall
join.fileInitData
- Initialization data as files for the federate to start. The elements of the array will be passed to the federate as command line argument in the same order as in the array.
java Federate --init-data fileInitData[0],fileInitData[1],fileInitData[2]
FederateStartException
- thrown if the federate could not be started on the model
manager.
java.rmi.RemoteException
- RMI remote exception happened while calling this method.void updateLock(FederateProcessHandle handle) throws java.rmi.RemoteException
No error is thrown if the handle does not identify a valid federate. The request will be silently ignored.
handle
- The previously fetched handle.
java.rmi.RemoteException
- RMI remote exception happened while calling this method.LOCK_TIMEOUT
boolean stopFederate(FederateProcessHandle federateProcessHandle) throws java.rmi.RemoteException
federateProcessHandle
- the handle of the federate process which shall be stopped.
This handle must have been received by the
{@link #lockFederate(String, String) method.
true
if the federate process is stopped,
false otherwise. It the federate was not running or if the
federate handle is unknown by the model manager this method
returns true
. A false
return value
does does not indicate if the process is running or not.
java.rmi.RemoteException
- RMI remote exception happened while calling this method.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |