|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdsg.smart.simul.WorkstationSession
Implementation of the Session interface for the simulated environment. Simulates a Session on a Smart workstation or iPaq.
Field Summary |
Fields inherited from interface dsg.smart.Session |
ST_IPAQ, ST_SMARTCENTRAL, ST_WEBSERVER, ST_WORKSTATION |
Constructor Summary | |
WorkstationSession(UserID userID)
|
Method Summary | |
void |
addModule(StreamModule mod)
Register a module; returns an integer used to later identify that stream module within this session. |
void |
connectModules(StreamModule moduleA,
int outputA,
StreamModule moduleB,
int inputB)
Connect together two modules: output #outputA of module #moduleA is piped to input #inputB of module #moduleB. |
java.lang.String |
getStationID()
ID of the iPaq or workstation on which we are running. |
int |
getStationRole()
Type of workstation this is --- iPaq, Standalone, etc. |
UserID |
getUserID()
User logged onto this station. |
SmartCentral |
openSmartCentral()
Open a connection to Smart Central |
SmartDB |
openSmartDB()
Open a connection to the Smart DB |
void |
removeModule(StreamModule[] mods)
Removes a set of source modules and all downstream dependants. |
void |
startModule(dsg.smart.simul.WorkstationSession.SMInfo mi)
|
void |
startModules(StreamModule[] mods)
Starts a set of source (zero-input) modules running --- as well as all downstream modules as well. |
void |
stopModules(StreamModule[] mods)
Stops a set of source (zero-input) modules from running --- as well as all dependnt downstream modules. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WorkstationSession(UserID userID)
Method Detail |
public java.lang.String getStationID()
getStationID
in interface Session
public UserID getUserID()
getUserID
in interface Session
public int getStationRole()
getStationRole
in interface Session
public void addModule(StreamModule mod)
addModule
in interface ModuleEnv
public void connectModules(StreamModule moduleA, int outputA, StreamModule moduleB, int inputB) throws SmartException
ModuleEnv
connectModules
in interface ModuleEnv
SmartException
public void startModule(dsg.smart.simul.WorkstationSession.SMInfo mi)
public void startModules(StreamModule[] mods) throws NotSourceModuleException
ModuleEnv
Starts a set of source (zero-input) modules running --- as well as all downstream modules as well. That is, starts the module chains headed by the listed modules. Downstream modules will only start if all their inputs are active (i.e. bound; connected). Consider the module graph:
d v a -> b -> c
In this case, a call to startModule(a) will start just a running. A subsequent call to startModule(d) will start d, b and c as well. A call to startModules({a,d}) will start it all running in an atomic fashion.
startModules
in interface ModuleEnv
NotSourceModuleException
public void stopModules(StreamModule[] mods) throws NotSourceModuleException
stopModules
in interface ModuleEnv
NotSourceModuleException
public void removeModule(StreamModule[] mods) throws SmartException
Removes a set of source modules and all downstream dependants. An exception will be thrown if the removal of some of the modules would leave other modules in place that are both: a) partially bound (i.e. one or more inputs is not bound) and b) running.
Theoretically, this can leave "incomplete" modules remaining --- modules in which only some of their inputs are bound. An IncompleteModuleException will be thrown in that case. An NotSourceModuleException is thrown if one or more of the modules being removed is not a source module.
removeModule
in interface ModuleEnv
SmartException
public SmartDB openSmartDB() throws SmartException
openSmartDB
in interface Session
SmartException
public SmartCentral openSmartCentral() throws SmartException
openSmartCentral
in interface Session
SmartException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |