Create a new Mot client.
Create a new Mot client.
Context in which this client will be registered.
Name of this client. Must be unique in the context and will be reported to the servers.
Maximum allowable response length, in bytes, this length is informed to the server. Connections that send messages longer than the maximum are dropped to a simple DOS attack with larger-than-allowed messages.
Maximum length (in messages) of the sending queue size. Too big a value uses too much memory, too little can degrade latency as the queue is empty too much time. There is one queue per counterpart.
Size (in bytes) of the reader buffer
Size (in bytes) of the writer buffer
Time after which an idle connection will be closed.
Time after which a client stop accepting messages if the connection cannot be established. Mot can accept (and enqueue) messages even if the underlying connection failed or cannot be created. Setting the tolerance to a lower value improves error detection, at the expense of not taking advantage of intermittent connections. Setting it to a higher value (or infinite) marked the interface more resilient, at the expense of not reporting connection errors until the requests time out.
Close the client.
Close the client. Calling this method terminates all threads and connections.
Time after which an idle connection will be closed.
Context in which this client will be registered.
Create a client flow.
Create a client flow. Objects created using this method can be associated to outgoing messages and after that used for response flow control.
Send a request and block until the response arrives or the timeout expires.
Main flow, always created and used as default when no flow is specified.
Main flow, always created and used as default when no flow is specified. Opening and closing the mainFlow is possible but not recommended.
Maximum allowable response length, in bytes, this length is informed to the server.
Maximum length (in messages) of the sending queue size.
Maximum length (in messages) of the sending queue size. Too big a value uses too much memory, too little can degrade latency as the queue is empty too much time. There is one queue per counterpart.
Name of this client.
Offer an unrespondible message.
Offer an unrespondible message.
Message destination.
Message to send.
Offer an unrespondible message.
Offer an unrespondible message. This method overload allows to specify whether (and how much time) to block waiting for space in the sending queue.
Message destination.
Message to send.
How much time to wait for the enqueuing of the message. The queue will be fill if the server is not reading requests fast enough. This has nothing to to with the time the server takes to respond, but it would be possible that an server with too many pending responses choose to stop reading new requests. A non-blocking client would use a zero timeout here, in combination with a large enough queue (in order to be able to keep pace with transitory differences in velocities).
Unit of the enqueingTimeout
true if the message could be enqueued, false otherwise
Offer a request.
Offer a request. When the response arrives, complete the promise passed as an argument.
Message destination.
Message to send.
How much to wait for the response, in milliseconds.
A promise that will receive the response when it arrives (or will receive the error). mot.util.UnaryPromise provides a convenient one-value promise for simple cases.
Offer a request.
Offer a request. When the response arrives, complete the promise passed as an argument. This method overload allows to specify whether (and how much time) to block waiting for space in the sending queue.
Message destination.
Message to send.
How much to wait for the response, in milliseconds.
A promise that will receive the response when it arrives (or will receive the error). mot.util.UnaryPromise provides a convenient one-value promise for simple cases.
How much time to wait for the enqueuing of the message. The queue will be fill if the server is not reading requests fast enough. This has nothing to to with the time the server takes to respond, but it would be possible that an server with too many pending responses choose to stop reading new requests. A non-blocking client would use a zero timeout here, in combination with a large enough queue (in order to be able to keep pace with transitory differences in velocities).
Unit of the enqueingTimeout
Offer a request.
Offer a request. When the response arrives, complete the promise passed as an argument. This method overload allows to specify a flow to use.
Message destination.
Message to send.
How much to wait for the response, in milliseconds.
A promise that will receive the response when it arrives (or will receive the error). mot.util.UnaryPromise provides a convenient one-value promise for simple cases.
A flow to associate with this message, this can be latter used to control the arrival of responses.
Whether the message could be enqueued or the corresponding queue overflowed.
Offer a request.
Offer a request. When the response arrives, complete the promise passed as an argument. This method overload allows to specify a flow to use and whether (and how much time) to block waiting for space in the sending queue.
Message destination.
Message to send.
How much to wait for the response, in milliseconds.
A promise that will receive the response when it arrives (or will receive the error). mot.util.UnaryPromise provides a convenient one-value promise for simple cases.
A flow to associate with this message, this can be latter used to control the arrival of responses.
How much time to wait for the enqueuing of the message. The queue will be fill if the server is not reading requests fast enough. This has nothing to to with the time the server takes to respond, but it would be possible that an server with too many pending responses choose to stop reading new requests. A non-blocking client would use a zero timeout here, in combination with a large enough queue (in order to be able to keep pace with transitory differences in velocities).
Unit of the enqueingTimeout
Whether the message could be enqueued or the corresponding queue overflowed.
Size (in bytes) of the reader buffer
Time after which a client stop accepting messages if the connection cannot be established.
Time after which a client stop accepting messages if the connection cannot be established. Mot can accept (and enqueue) messages even if the underlying connection failed or cannot be created. Setting the tolerance to a lower value improves error detection, at the expense of not taking advantage of intermittent connections. Setting it to a higher value (or infinite) marked the interface more resilient, at the expense of not reporting connection errors until the requests time out.
Size (in bytes) of the writer buffer
Mot client. Instantiate this class to create a client-side Mot protocol engine.