RMI / Client
This is the client module of RMI.
In a typical RMI scenario, there will be multiple processes implementing a RMI client
acessing one process that implements a RMI server.
A RMI client is working on a stream and has access to all basic RMI utilities. With RMIPollNetwork you can poll this stream
so RMI can invoke methods clled by the server on the local objects registered with RMIRegisterObjectServie (see fscom.rmishared).
To invoke remote methods use the proxy objects returned by RMIGetServiceObject.
If you wish to have a 1 to 1 network relationship you can place one RMI client on each end of a stream and set up the stream by yourself.
Of course you can also use every other kind of stream to invoke methods from or send invocations to
(but it may be a good idea to use nonblocking methods with streams that can't answer).
Functions Summary
Functions
Function RMIConnect:Object(host:String , port:Short = 55555 , executor:TExecutor=Null) |
Returns | An object that identifies this rmi client. |
Description | Connect to a host as an RMI client via TCP. |
Function RMIGetServiceObject:Object(serviceName:String , localProxyClass:String = "", clientRef:Object=Null) |
Description | Returns a well prepared object to use as a client. |
Information | This function will create a proxy object and prepares it to be used as
clientside RMI service.
Every method you call on such an object will call RMIInvokeRemote (see fscom.rmishared) to call a method over RMI. |
Function RMIStartClient:Object(stream:TStream , executor:TExecutor=Null) |
Returns | An object that identifies this rmi client. |
Description | Start the RMI client with a custom stream. |
Module Information
Version | 0.3 |
Author | Francesco Silvani |
License | zlib/libpng |
History | 0.3 |
History | Removed automatic polling since this blocks events. |
History | 0.2 |
History | Better exception handling. |
History | Fixed not returning data in PollNetwork |
History | 0.1 |
History | Removed rmiclientex and inserted here. |
History | Added local stream polling for receiving invocations from the server |