Attempt to bind this WorkerItem to the worker.
Attempt to bind this WorkerItem to the worker. When the binding succeeds,
onBind()
is called and the item will be able to receive events and
messages. Notice that this method is asynchronous.
The worker to bind to
When bound to a worker, this contains the [WorkerItemBinding]
When bound to a worker, this contains the [WorkerItemBinding]
This handler is called when a Worker new Connection is established.
This handler is called when a Worker new Connection is established. A Connection can be either an incoming (ie: something to connected to the server), or outgoing(ie: the server connected to a remote system).
The endpoint which wraps the java NIO layer.
Connection was closed on our end, either by a shutdown, or by normal means
Connection was closed on our end, either by a shutdown, or by normal means
why the connection was closed
Event handler for when a connection failed.
Event handler for when a connection failed.
Connection lost is caused by termination, closed, etc
Connection lost is caused by termination, closed, etc
why the connection was lost
Underlying WriteEndpoint's ConnectionStatus, defaults to Connecting if there is no WriteEndpoint
Called from Worker when a connection has been terminated either by and error or by normal means.
Called from Worker when a connection has been terminated either by and error or by normal means.
why the connection was terminated
Allow any requests in transit to complete, but cancel all pending requests and don't allow any new ones
Allow any requests in transit to complete, but cancel all pending requests and don't allow any new ones
Called periodically on every attached connection handler, this can be used for checking if an ongoing operation has timed out.
Called periodically on every attached connection handler, this can be used for checking if an ongoing operation has timed out.
Be aware that this is totally independant of a connection's idle timeout, which is only based on the last time there was any I/O.
the frequency at which this method is called. Currently this is hardcoded to WorkerManager.IdleCheckFrequency
, but may become application dependent in the future.
Checks if the underlying WriteEndpoint's status is ConnectionStatus.
Checks if the underlying WriteEndpoint's status is ConnectionStatus.Connected
Called when the item is bound to a worker.
Called when the item is bound to a worker.
Called when the item has been unbound from a worker
Called when the item has been unbound from a worker
This function is called to signal to the handler that it can resume writing data.
This function is called to signal to the handler that it can resume writing data. It is called as part of the WriteEndPoint event loop write cycle, where previously this handler attempted to write data, but the buffers were filled up. This is called once the buffers are empty again and able to receive data. This handler should be in a state where it is paused on writing data until this handler is invoked.
Handler which is called when data is received from a Connection.
Handler which is called when data is received from a Connection.
DataBuffer read from the underlying Connection.
Provides a way to send this WorkerItem a message from an Actor by way of WorkerCommand.
Provides a way to send this WorkerItem a message from an Actor by way of WorkerCommand.Message.
The message that was sent
The sender who sent the message
Create a callback for sending a request.
Create a callback for sending a request. this allows you to do something like service.sendCB("request"){response => "YAY"}.map{str => println(str)}.execute()
Create a shared interface that is thread safe and returns Futures
Create a shared interface that is thread safe and returns Futures
Unbinds the WorkerItem, if it is bound.
Unbinds the WorkerItem, if it is bound. When unbinding is complete,
onUnbind()
is called. This method is asynchronous.