fscom.rmiserver: | Functions | Types | Modinfo | Source |
The server component will manage the handling of multiple clients connecting to the process. The clients will be able to invoke methods from objects registered with RMIRegisterObjectService (see fscom.rmishared) on the server.
To give you further control of the clients, you can register types as service using RMIRegisterTypeService. A new object will then be created for every client that connects. You can also access the client's service registry and call methods on the client.
RMIRegisterTypeService | Register an type as a RMI service. |
RMIStartServer | Start RMI Server. |
RMIUnregistertypeService | Remove a service type from the service registry. |
TRMIClient | Represents an client connected to RMI. |
Function RMIRegisterTypeService(typeName:String , serviceName:String = "") | |
Description | Register an type as a RMI service. |
Information | Registering an type on a RMI server will make the server
creating a new instance for each client.
If the type has a Method OnConnect(client: TRMIClient), this method will be called right after an instance was created by RMI. If the type has a Method OnDisconnect(), it will be called after the client disconnected and the instance was removed from the RMI service registry. Use the client object given in the OnConnect method to get client information, the other service instances associated with the same client and remote services of the client. |
Function RMIStartServer(port:Short = 55555,executor:TExecutor=Null) | |
Description | Start RMI Server. |
Information | This will start an RMIServer on the given port and will create a timer to poll the network with the given hertz. You'll need to have a WaitSystem/WaitEvent/PollSystem call in your main loop or have polling activated. |
Function RMIUnregistertypeService(typeName:String) | |
Description | Remove a service type from the service registry. |
Type TRMIClient Abstract | |
Description | Represents an client connected to RMI. |
Methods Summary | |
---|---|
GetIp | Get the ip of the client. |
GetLocalServiceObject | Will get the instance of the type service that is associated with the client. |
GetPort | Get the port of the client. |
GetProtocol | Get the protocol, the client is using. Will be "tcp" TODO: or "udp" |
GetRemoteServiceObject | Will get a proxy object of a client's service. Acts like RMIGetServiceObject (see fscom.rmiclient). |
GetSharedObject | Gets the shared object. |
SetSharedObject | Sets a shared object associated with the client (e.g. login information) |
Method GetIp:Int() Abstract | |
Description | Get the ip of the client. |
Method GetLocalServiceObject:Object(name:String) Abstract | |
Description | Will get the instance of the type service that is associated with the client. |
Method GetPort:Short() Abstract | |
Description | Get the port of the client. |
Method GetProtocol:String() Abstract | |
Description | Get the protocol, the client is using. Will be "tcp" TODO: or "udp" |
Method GetRemoteServiceObject:Object(serviceName:String , localProxyClass:String = "") Abstract | |
Description | Will get a proxy object of a client's service. Acts like RMIGetServiceObject (see fscom.rmiclient). |
Method GetSharedObject:Object() Abstract | |
Description | Gets the shared object. |
Method SetSharedObject:Object(obj:Object) Abstract | |
Returns | the old shared object. |
Description | Sets a shared object associated with the client (e.g. login information) |
Version | 0.2 |
---|---|
Author | Francesco Silvani |
License | zlib/libpng |
History | 0.2 |
History | Added TRMITypeService. These services create one object per client and allow callbacks. |