jist.runtime
Interface ControllerRemote

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
Controller

public interface ControllerRemote
extends java.rmi.Remote

Remote (RMI) interface that Controllers implement and use to interoperate.

Since:
JIST1.0
Version:
$Id: ControllerRemote.java,v 1.19 2004/04/06 16:07:43 barr Exp $
Author:
Rimon Barr <barr+jist@cs.cornell.edu>

Method Summary
 void addEvent(Event ev)
          Insert event in into event queue.
 void addEvent(java.lang.reflect.Method meth, EntityRef ref, java.lang.Object[] params)
          Insert event in into event queue (performance: avoids need to get controller instance to create event - shaves off around 10%).
 void addEvent(java.lang.reflect.Method meth, EntityRef ref, java.lang.Object[] params, long time)
          Insert event in into event queue (performance: avoids need to get controller instance to create event - shaves off around 10%).
 void endAt(long time)
          End simulation after given time-step.
 java.lang.Class getEntityClass(int index)
          Return type of specific entity at this Controller.
 void log(java.lang.String s)
          Emit message in JisT log.
 void setSimUnits(long ticks, java.lang.String name)
          Set the simulation time units.
 void start()
          Start the Controller processing thread with given rewriter instance.
 java.lang.String toStringEntity(int index)
          Return toString of a specific entity at this Controller.
 

Method Detail

start

void start()
           throws java.rmi.RemoteException
Start the Controller processing thread with given rewriter instance. The thread will die when there are no more events to process, or simulation time limit is reached, whichever comes first.

Throws:
java.rmi.RemoteException - rpc failure

endAt

void endAt(long time)
           throws java.rmi.RemoteException
End simulation after given time-step.

Parameters:
time - simulation time to end
Throws:
java.rmi.RemoteException - rpc failure

setSimUnits

void setSimUnits(long ticks,
                 java.lang.String name)
                 throws java.rmi.RemoteException
Set the simulation time units.

Parameters:
ticks - number of simulation quanta
name - unit of time name
Throws:
java.rmi.RemoteException - rpc failure

addEvent

void addEvent(Event ev)
              throws java.rmi.RemoteException
Insert event in into event queue.

Parameters:
ev - event to schedule
Throws:
java.rmi.RemoteException - rpc failure

addEvent

void addEvent(java.lang.reflect.Method meth,
              EntityRef ref,
              java.lang.Object[] params)
              throws java.rmi.RemoteException
Insert event in into event queue (performance: avoids need to get controller instance to create event - shaves off around 10%).

Parameters:
meth - method of event to schedule
ref - entity reference of event to schedule
params - parameters of event to schedule
Throws:
java.rmi.RemoteException - rpc failure

addEvent

void addEvent(java.lang.reflect.Method meth,
              EntityRef ref,
              java.lang.Object[] params,
              long time)
              throws java.rmi.RemoteException
Insert event in into event queue (performance: avoids need to get controller instance to create event - shaves off around 10%).

Parameters:
meth - method of event to schedule
ref - entity reference of event to schedule
params - parameters of event to schedule
time - event invocation time
Throws:
java.rmi.RemoteException - rpc failure

getEntityClass

java.lang.Class getEntityClass(int index)
                               throws java.rmi.RemoteException
Return type of specific entity at this Controller.

Parameters:
index - local entity identifier
Returns:
request entity object type
Throws:
java.rmi.RemoteException - rpc failure

toStringEntity

java.lang.String toStringEntity(int index)
                                throws java.rmi.RemoteException
Return toString of a specific entity at this Controller.

Parameters:
index - local entity identifier
Returns:
toString of given entity
Throws:
java.rmi.RemoteException - rpc failure

log

void log(java.lang.String s)
         throws java.rmi.RemoteException
Emit message in JisT log.

Parameters:
s - string to log
Throws:
java.rmi.RemoteException - rpc failure