|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprovided.client.model.ClientModel
public class ClientModel
The model of the client system.
Field Summary | |
---|---|
private IRemoteTaskViewAdapter |
clientTA
The view adapter that the server can use to append messages to this client's view. |
private IRemoteTaskViewAdapter |
clientTAstub
RMI stub for clientTA. |
private ICompute |
comp
A reference to the proxy stub of the remote ICompute object. |
private IVoidLambda<java.lang.String> |
outputCmd
output command used to put multiple strings up onto the view. |
(package private) IRMIUtils |
rmiUtils
Factory for the Registry and other uses. |
private IRemoteTaskViewAdapter |
serverTA
The adapter that connects all the way back to the remote system's view enabling this client to append messages to the server's view. |
private IViewAdapter |
view
Adapter to the view |
Constructor Summary | |
---|---|
ClientModel(IViewAdapter view)
Constructor for the class |
Method Summary | |
---|---|
java.lang.String |
calcGetInfo(java.lang.String p)
Gets the system information from the remote server by sending an entire GetInfo object to the remote server. |
java.lang.String |
calcPi(int numDigits)
Calculates PI to the given number of decimal places by sending an entire Pi2 object to the remote ICompute object. |
java.lang.String |
connectTo(java.lang.String remoteHost)
Connects to the given remote host and retrieves the stub to the ICompute object bound to the ICompute.BOUND_NAME name in the remote Registry on port IRMI_Defs.REGISTRY_PORT. |
void |
start()
Starts the model by setting all the required RMI system properties, starts up the class server and installs the security manager. |
void |
stop()
Stops the client by shutting down the class server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private IVoidLambda<java.lang.String> outputCmd
IRMIUtils rmiUtils
private IViewAdapter view
private ICompute comp
private IRemoteTaskViewAdapter serverTA
private IRemoteTaskViewAdapter clientTA
private IRemoteTaskViewAdapter clientTAstub
Constructor Detail |
---|
public ClientModel(IViewAdapter view)
view
- The adapter to the view.Method Detail |
---|
public void start()
public void stop()
public java.lang.String connectTo(java.lang.String remoteHost)
remoteHost
- The IP address or host name of the remote server.
public java.lang.String calcPi(int numDigits)
numDigits
- The number of digits to compute PI to.
public java.lang.String calcGetInfo(java.lang.String p)
p
- A string passed to the GetInfo object to use as it pleases.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |