ServerChannel
A Channel that accepts an incoming connection attempts and creates its child Channels by accepting them. A ServerChannel does not allow the following operations and so will throws Exception of these operations:
- connect(SocketAddress)
- disconnect()
- write(Object)
- flush()
- shutdown(ChannelShutdownDirection)
Attributes
- Graph
-
- Supertypes
Members list
Value members
Inherited methods
Attributes
- Inherited from:
- ChannelAddress
actor send ask message to channel, in underlying, it calls channel.write
actor send ask message to channel, in underlying, it calls channel.write
Value parameters
- future
-
the reply message future.
- value
-
ask message which need this Channel relpy a message.
Attributes
- Returns
-
the reply message future.
- Inherited from:
- ChannelAddress
Attributes
- Inherited from:
- Channel
Attributes
- Inherited from:
- ChannelAddress
Request to bind to the given SocketAddress and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error. This will result in having the SocketAddress) method called of the next ChannelHandler contained in the ChannelPipeline of the Channel.
Request to bind to the given SocketAddress and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error. This will result in having the SocketAddress) method called of the next ChannelHandler contained in the ChannelPipeline of the Channel.
Value parameters
- future
-
bind async result
- local
-
Address to bind
Attributes
- Returns
-
same ChannelFuture in params future
- Inherited from:
- ChannelAddress
Attributes
- Inherited from:
- Channel
Attributes
- Inherited from:
- Channel
Request to close the Channel and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error. After it is closed it is not possible to reuse it again. This will result in having the ChannelHandler.close method called of the next ChannelHandler contained in the ChannelPipeline of the Channel.
Request to close the Channel and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error. After it is closed it is not possible to reuse it again. This will result in having the ChannelHandler.close method called of the next ChannelHandler contained in the ChannelPipeline of the Channel.
Value parameters
- future
-
operation async result.
Attributes
- Returns
-
same ChannelFuture in params future
- Inherited from:
- ChannelAddress
Request to connect to the given SocketAddress and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error. If the connection fails because of a connection timeout, the ChannelFuture will get failed with a ConnectTimeoutException. If it fails because of connection refused a ConnectException will be used. This will result in having the SocketAddress, SocketAddress) method called of the next ChannelHandler contained in the ChannelPipeline of the Channel.
Request to connect to the given SocketAddress and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error. If the connection fails because of a connection timeout, the ChannelFuture will get failed with a ConnectTimeoutException. If it fails because of connection refused a ConnectException will be used. This will result in having the SocketAddress, SocketAddress) method called of the next ChannelHandler contained in the ChannelPipeline of the Channel.
Value parameters
- remote
-
remote address to connect.
Attributes
- Inherited from:
- ChannelAddress
Request to connect to the given SocketAddress while bind to the local and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error. This will result in having the SocketAddress, SocketAddress) method called of the next ChannelHandler contained in the ChannelPipeline of the Channel.
Request to connect to the given SocketAddress while bind to the local and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error. This will result in having the SocketAddress, SocketAddress) method called of the next ChannelHandler contained in the ChannelPipeline of the Channel.
Value parameters
- future
-
operation async result.
- local
-
local address to bind.
- remote
-
remote address to connect.
Attributes
- Returns
-
same ChannelFuture in params future
- Inherited from:
- ChannelAddress
Return the assigned PooledPageAllocator which will be used to allocate RecyclablePageBuffers.
Return the assigned PooledPageAllocator which will be used to allocate RecyclablePageBuffers.
Attributes
- Inherited from:
- Channel
Request to disconnect from the remote peer and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error. This will result in having the ChannelHandler.disconnect method called of the next ChannelHandler contained in the ChannelPipeline of the Channel.
Request to disconnect from the remote peer and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error. This will result in having the ChannelHandler.disconnect method called of the next ChannelHandler contained in the ChannelPipeline of the Channel.
Value parameters
- future
-
operation async result.
Attributes
- Returns
-
same ChannelFuture in params future
- Inherited from:
- ChannelAddress
Executor of this channel instance, the channel inbound and outbound event must execute in the binding executor
Executor of this channel instance, the channel inbound and outbound event must execute in the binding executor
Attributes
- Inherited from:
- Channel
Attributes
- Inherited from:
- ChannelAddress
Attributes
- Inherited from:
- ChannelAddress
generate a unique id for the channel message
Return the value of the given ChannelOption
Return the value of the given ChannelOption
Type parameters
- T
-
the type of the value.
Value parameters
- option
-
the ChannelOption
Attributes
- Returns
-
the value for the ChannelOption
- Throws
-
ChannelException
thrown on error.
UnsupportedOperationExceptionif the ChannelOption is not supported.
- Inherited from:
- Channel
Attributes
- Inherited from:
- Channel
Unique id of this channel
Attributes
- Inherited from:
- Channel
Attributes
- Inherited from:
- Channel
Returns true if the given ChannelOption is supported by this Channel implementation. If this methods returns false, calls to setOption and getOption with the ChannelOption will throw an UnsupportedOperationException.
Returns true if the given ChannelOption is supported by this Channel implementation. If this methods returns false, calls to setOption and getOption with the ChannelOption will throw an UnsupportedOperationException.
Value parameters
- option
-
the option.
Attributes
- Returns
-
true if supported, false otherwise.
- Inherited from:
- Channel
Return true if registered already.
Return true if registered already.
Attributes
- Returns
-
true
if registered,false
otherwise - Inherited from:
- Channel
Returns true if the ChannelShutdownDirection of the Channel was shutdown before.
Returns true if the ChannelShutdownDirection of the Channel was shutdown before.
Attributes
- Inherited from:
- Channel
Attributes
- Returns
-
true if and only if the executor thread will perform the requested flush operation immediately. Any write requests made when this method returns false are queued until the executor thread is ready to process the queued write requests.
- Inherited from:
- Channel
Returns the local address where this channel is bound to. The returned SocketAddress is supposed to be down-cast into more concrete type such as InetSocketAddress to retrieve the detailed information.
Returns the local address where this channel is bound to. The returned SocketAddress is supposed to be down-cast into more concrete type such as InetSocketAddress to retrieve the detailed information.
Attributes
- Returns
-
the local address of this channel. None if this channel is not bound
- Inherited from:
- Channel
Attributes
- Inherited from:
- Channel
Attributes
- Inherited from:
- ChannelAddress
Opens or creates a file, returning a file channel to access the file. An invocation of this method behaves in exactly the same way as the invocation
Opens or creates a file, returning a file channel to access the file. An invocation of this method behaves in exactly the same way as the invocation
options)
where options is a set of the options specified in the options array
This will result in having the ChannelHandler.open method called of the next ChannelHandler contained in the ChannelPipeline of the Channel.
Value parameters
- attrs
-
An optional list of file attributes to set atomically when creating the file
- file
-
The file to open or create
- fu
-
operation async result. It maybe fails with
- IllegalArgumentException - If the set contains an invalid combination of options
- UnsupportedOperationException – If the path is associated with a provider that does not support creating file channels, or an unsupported open option is specified.
- FileAlreadyExistsException – If a file of that name already exists and the CREATE_NEW option is specified and the file is being opened for writing (optional specific exception) IOException – If an I/O error occurs
- SecurityException – If a security manager is installed and it denies an unspecified permission required by the implementation. In the case of the default provider, the SecurityManager.checkRead(String) method is invoked to check read access if the file is opened for reading. The SecurityManager.checkWrite(String) method is invoked to check write access if the file is opened for writing
- opts
-
Options specifying how the file is opened
Attributes
- Returns
-
same ChannelFuture in params future
- See also
-
FileChannel
- Inherited from:
- ChannelAddress
Opens or creates a file, returning a file channel to access the file. An invocation of this method behaves in exactly the same way as the invocation
Opens or creates a file, returning a file channel to access the file. An invocation of this method behaves in exactly the same way as the invocation
options)
where options is a set of the options specified in the options array
This will result in having the ChannelHandler.open method called of the next ChannelHandler contained in the ChannelPipeline of the Channel.
Value parameters
- attrs
-
An optional list of file attributes to set atomically when creating the file
- future
-
operation async result. It maybe fails with
- IllegalArgumentException - If the set contains an invalid combination of options
- UnsupportedOperationException – If the path is associated with a provider that does not support creating file channels, or an unsupported open option is specified.
- FileAlreadyExistsException – If a file of that name already exists and the CREATE_NEW option is specified and the file is being opened for writing (optional specific exception) IOException – If an I/O error occurs
- SecurityException – If a security manager is installed and it denies an unspecified permission required by the implementation. In the case of the default provider, the SecurityManager.checkRead(String) method is invoked to check read access if the file is opened for reading. The SecurityManager.checkWrite(String) method is invoked to check write access if the file is opened for writing
- opts
-
Options specifying how the file is opened
- path
-
The path of the file to open or create
Attributes
- Returns
-
same ChannelFuture in params future
- See also
-
FileChannel
- Inherited from:
- ChannelAddress
Attributes
- Inherited from:
- Channel
Attributes
- Inherited from:
- Channel
Return the assigned ChannelPipeline.
Reactor of this actor system.
Attributes
- Inherited from:
- ChannelAddress
Request to read data from the Channel, triggers an Object) event if data was read, and triggers a channelReadComplete event so the handler can decide to continue reading. If there's a pending read operation already, this method does nothing. This will result in having the ReadBufferAllocator) method called of the next ChannelHandler contained in the ChannelPipeline of the Channel.
Request to read data from the Channel, triggers an Object) event if data was read, and triggers a channelReadComplete event so the handler can decide to continue reading. If there's a pending read operation already, this method does nothing. This will result in having the ReadBufferAllocator) method called of the next ChannelHandler contained in the ChannelPipeline of the Channel.
Attributes
- Inherited from:
- ChannelAddress
Returns the remote address where this channel is connected to. The returned SocketAddress is supposed to be down-cast into more concrete type such as InetSocketAddress to retrieve the detailed information.
Returns the remote address where this channel is connected to. The returned SocketAddress is supposed to be down-cast into more concrete type such as InetSocketAddress to retrieve the detailed information.
Attributes
- Returns
-
the remote address of this channel. None if this channel is not connected. If this channel is not connected but it can receive messages from arbitrary remote addresses (e.g. DatagramChannel, use DatagramPacket#recipient() to determine the origination of the received message as this method will return None.
- Inherited from:
- Channel
Attributes
- Inherited from:
- Channel
Sets a configuration property with the specified name and value.
Sets a configuration property with the specified name and value.
Type parameters
- T
-
the type of the value.
Value parameters
- option
-
the ChannelOption
- value
-
the value for the ChannelOption
Attributes
- Returns
-
itself.
- Throws
-
ChannelException
thrown on error.
UnsupportedOperationExceptionif the ChannelOption is not supported.
- Inherited from:
- Channel
Set the local address where this channel is bound to.
Set the local address where this channel is bound to.
Value parameters
- address
-
address where this channel is bound to.
Attributes
- Inherited from:
- Channel
Set the remote address where this channel is connected to.
Set the remote address where this channel is connected to.
Value parameters
- address
-
remote address where this channel is connected to.
Attributes
- Inherited from:
- Channel
Request shutdown one direction of the Channel and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error. When completed, the channel will either not produce any inbound data anymore, or it will not be possible to write data anymore, depending on the given ChannelShutdownDirection. Depending on the transport implementation shutting down the ChannelShutdownDirection.Outbound or ChannelShutdownDirection.Inbound might also result in data transferred over the network. Like for example in case of TCP shutting down the ChannelShutdownDirection.Outbound will result in a FIN that is transmitted to the remote peer that will as a result shutdown ChannelShutdownDirection.Inbound. This will result in having the ChannelShutdownDirection). method called of the next ChannelHandler contained in the ChannelPipeline of the Channel.
Request shutdown one direction of the Channel and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error. When completed, the channel will either not produce any inbound data anymore, or it will not be possible to write data anymore, depending on the given ChannelShutdownDirection. Depending on the transport implementation shutting down the ChannelShutdownDirection.Outbound or ChannelShutdownDirection.Inbound might also result in data transferred over the network. Like for example in case of TCP shutting down the ChannelShutdownDirection.Outbound will result in a FIN that is transmitted to the remote peer that will as a result shutdown ChannelShutdownDirection.Inbound. This will result in having the ChannelShutdownDirection). method called of the next ChannelHandler contained in the ChannelPipeline of the Channel.
Value parameters
- direction
-
direction to shutdown
- future
-
operation async result
Attributes
- Returns
-
same ChannelFuture in params future
- Inherited from:
- ChannelAddress
Timer of this actor system.
Attributes
- Inherited from:
- Channel
Returns how many bytes can be written before the Channel becomes 'unwritable'. Once a Channel becomes unwritable, all messages will be queued until the executor thread is ready to process the queued write requests.
Attributes
- Inherited from:
- Channel
Attributes
- Inherited from:
- Channel