fscom.rmiclient: Functions Modinfo Source  

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

RMIConnect Connect to a host as an RMI client via TCP.
RMIGetServiceObject Returns a well prepared object to use as a client.
RMIStartClient Start the RMI client with a custom stream.

Functions

Function RMIConnect:Object(host:String , port:Short = 55555 , executor:TExecutor=Null)
ReturnsAn object that identifies this rmi client.
DescriptionConnect to a host as an RMI client via TCP.

Function RMIGetServiceObject:Object(serviceName:String , localProxyClass:String = "", clientRef:Object=Null)
DescriptionReturns a well prepared object to use as a client.
InformationThis 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)
ReturnsAn object that identifies this rmi client.
DescriptionStart the RMI client with a custom stream.

Module Information

Version0.3
AuthorFrancesco Silvani
Licensezlib/libpng
History0.3
HistoryRemoved automatic polling since this blocks events.
History0.2
HistoryBetter exception handling.
HistoryFixed not returning data in PollNetwork
History0.1
HistoryRemoved rmiclientex and inserted here.
HistoryAdded local stream polling for receiving invocations from the server