Type of the header containing initial data.
Type of additional features provided for the remote client.
Current state of the MutexAcceptor
Header containing initialization data like activation.
IP Address of client.
Path of client has connected.
Get state.
Get current state of connection state with the remote client. List of values are such like below:
REJECTING
: The {@link MutexConnector.reject} method is on running.NONE
: The MutexAcceptor instance is newly created, but did nothing yet.ACCEPTING
: The MutexConnector.connect method is on running.OPEN
: The connection is online.CLOSING
: The MutexConnector.close method is on running.CLOSED
: The connection is offline.Accept connection.
Accepts, permits the client's connection to this mutex-server
and starts interaction.
An object providing additional features for the remote client. If you don't have plan to proivde any additional feature, assign null
.
Close connection.
Close connection with the remote client.
When connection with the remote client has been closed, all of the locks the client had
acquired and tried would be automatically unlocked and cancelled by this mutex-server
.
Also, remote critical section components had assigned to the client would be returned, too.
In addition, the disconnection destories all RFCs
between the remote client. Therefore, if the remote client is providing custom features to
your mutex-server
and there're uncompleted method calls to the Provider
through
Driver<Controller>
, RuntimeError exceptions would be thrown.
Closing code.
Reason why.
Get Driver for RFC.
If remote client provides custom features for this mutex-server
, you can utilize
those features thorugh returned Driver
object by this method. To use this method, you
should define the Controller
template argument, a type of interface who is defining
additionla features provided from the remote client.
The returned object Driver
makes to call remote functions, defined in the Controller
and provided by Provider
in the remote client, possible. In other words, callling a
function in the Driver<Controller>
, it means to call a matched function in the remote
client's Provider
object.
Controller
: Definition onlyDriver
: Remote Function CallAn interface for provided features (functions & objects) from the remote client (Provider
).
Whether to convert type of function parameters to be compatible with their pritimive.
A Driver
for the RFC.
Join connection.
Wait until connection with the server to be closed.
Join connection until timeout.
Wait until connection with the server to be clsoed until timeout.
The maximum miliseconds for waiting.
Whether succeeded to waiting in the given time.
Join connection until time expiration.
Wait until connection with the server to be closed until time expiration.
The maximum time point to wait.
Whether succeeded to waiting in the given time.
Reject connection.
Reject without acceptance, any interaction. The connection would be closed immediately.
Reason why.
Generated using TypeDoc
Acceptor of the
mutex-server
.The MutexAcceptor is a communicator class interacting with the remote client, through websocket and RFC protocol, in the
mutex-server
. The MutexAcceptor objects are always created by the MutexServer class, whenever a remote client connects to themutex-server
.You can accept or reject the client's connection by calling accept or reject method. If you accept the connection, the interaction would be started and the client can access to critical component sections of this
mutex-server
.Also, when declaring this MutexAcceptor type, you've to define two template arguments, Header and Provider*. The *Header type repersents an initial data gotten from the remote client after the connection. I hope you and client not to omit it and utilize it as an activation tool to enhance security.
The second template argument Provider represents the additional features provided for the remote client. If you don't have any plan to provide additional feature to the remote client, just declare it as
null
Jeongho Nam - https://github.com/samchon