WorkerServer is a class representing a
Worker server who can communicate with
remote client, parent and creator of the
Worker (anyway WorkerConnector), using
RFC (Remote Function Call).
Unlike other servers,
WorkerServer can accept only a client (WorkerConnector)
because the worker is dependent on its parent instance (web page, node or parent worker).
WorkerServer does not have any acceptor and communicates with client (its parent)
To start communication with the remote client, call the open() method with special
Provider. After your business, don't forget terminating this worker using close()
or WorkerConnector.close() method. If you don't terminate it, then vulnerable
memory and communication channel would be kept and it may cause the memory leak.
Type of features provided for remote system.
Arguments delivered from the connector.
Close connection between the remote worker system.
It destroies all RFCs (remote function calls) between this and the remote system
Driver<Controller>) that are not returned (completed) yet. The destruction
causes all incompleted RFCs to throw exceptions.
Destory the communicator.
A destory function must be called when the network communication has been closed.
It would destroy all function calls in the remote system (by
which are not returned yet.
The error instance would be thrown to those function calls. If the disconnection is abnormal, then write the detailed reason why into the error instance.
An error instance to be thrown to the unreturned functions.
Get Driver for RFC (Remote Function Call).
Controller is an interface who defines provided functions from the remote
Driver is an object who makes to call remote functions, defined in
Controller and provided by
Provider in the remote system, possible.
In other words, calling a functions in the
Driver<Controller>, it means to call
a matched function in the remote system's
Controller: Definition only
Driver: Remote Function Call
An interface for provided features (functions & objects) from the remote system (
Whether to convert type of function parameters to be compatible with their pritimive.
A Driver for the RFC.
Get an object providing features (functions & objects) for remote system. The remote
system would call the features (
Provider) by using its
Join connection or timeout.
The maximum milliseconds for joining.
Whether awaken by disconnection or timeout.
Join connection or time expiration.
The maximum time point to join.
Whether awaken by disconnection or time expiration.
Open server with
Open worker server and start communication with the remote system (WorkerConnector).
Note that, after your business, you should terminate this worker to prevent waste of memory leak. Close this worker by yourself (close) or let remote client to close this worker (WorkerConnector.close).
An object providing featrues for the remote system.
Data Reply Function.
A function should be called when data has come from the remote system.
When you receive a message from the remote system, then parse the message with your special protocol and covert it to be an Invoke object. After the conversion, call this method.
Structured data converted by your special protocol.
An object would be provided for remote system.
Generated using TypeDoc