NioServerSocketChannel

cc.otavia.core.transport.nio.channel.NioServerSocketChannel

Attributes

Graph
Supertypes
trait ChannelState
trait Channel
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def localAddress: Option[SocketAddress]

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

Definition Classes
override def remoteAddress: Option[SocketAddress]

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.

Definition Classes

Attributes

Definition Classes

Inherited methods

override def ask(value: AnyRef): ChannelFutureState

Attributes

Definition Classes
Inherited from:
AbstractChannel
override def ask(value: AnyRef, future: ChannelFuture): ChannelFuture

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.

Definition Classes
Inherited from:
AbstractChannel
final def assertExecutor(): Unit

Attributes

Inherited from:
Channel
override def batchNotice(notices: Seq[AnyRef]): Unit

Attributes

Definition Classes
Inherited from:
AbstractChannel
def bind(local: SocketAddress, future: ChannelFuture): ChannelFuture

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
def cleanEntity(): Unit

Attributes

Inherited from:
QueueMapEntity

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
final def connect(remote: SocketAddress, future: ChannelFuture): ChannelFuture

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
def connect(remote: SocketAddress, local: Option[SocketAddress], future: ChannelFuture): ChannelFuture

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

Definition Classes
Inherited from:
AbstractChannel

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
override def entityId: Long

Attributes

Definition Classes
Inherited from:
AbstractChannel
final override def executor: ChannelsActor[_]

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

Definition Classes
Inherited from:
AbstractChannel

Address of executor ChannelsActor of this Channel belong to.

Address of executor ChannelsActor of this Channel belong to.

Attributes

Inherited from:
Channel
final def flush(): ChannelAddress.this.type

Attributes

Inherited from:
ChannelAddress
final override def flushable(): Boolean

Attributes

Definition Classes
Inherited from:
AbstractChannel
override def generateMessageId: Long

generate a unique id for the channel message

generate a unique id for the channel message

Attributes

Returns

id

Definition Classes
Inherited from:
AbstractChannel
final protected def get(mask: Long): Boolean

Attributes

Inherited from:
CompressionBooleanLong
final def getAt(position: Int): Boolean

Attributes

Inherited from:
CompressionBooleanLong
final override def getOption[T](option: ChannelOption[T]): T

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.

UnsupportedOperationException

if the ChannelOption is not supported.

Definition Classes
Inherited from:
AbstractChannel

Attributes

Definition Classes
Inherited from:
AbstractChannel
override def id: Int

Unique id of this channel

Unique id of this channel

Attributes

Definition Classes
Inherited from:
AbstractChannel
final override def inflightFutureSize: Int

Attributes

Definition Classes
Inherited from:
AbstractChannel
final override def inflightStackSize: Int

Attributes

Definition Classes
Inherited from:
AbstractChannel
def invokeLater(task: Runnable): Unit

Attributes

Inherited from:
AbstractChannel
final override def isActive: Boolean

Return true if the Channel is active and so connected.

Return true if the Channel is active and so connected.

Attributes

Definition Classes
Inherited from:
AbstractChannel
final override def isMounted: Boolean

Returns true if the Channel is mounted to ChannelsActor

Returns true if the Channel is mounted to ChannelsActor

Attributes

Definition Classes
Inherited from:
AbstractChannel
final override def isOpen: Boolean

Returns true if the Channel is open and may get active later

Returns true if the Channel is open and may get active later

Attributes

Definition Classes
Inherited from:
AbstractChannel
final override def isOptionSupported(option: ChannelOption[_]): Boolean

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.

Definition Classes
Inherited from:
AbstractChannel
def isPending: Boolean

Attributes

Inherited from:
AbstractChannel
final override def isRegistered: Boolean

Return true if registered already.

Return true if registered already.

Attributes

Returns

true if registered, false otherwise

Definition Classes
Inherited from:
AbstractChannel
override def isShutdown(direction: ChannelShutdownDirection): Boolean

Returns true if the ChannelShutdownDirection of the Channel was shutdown before.

Returns true if the ChannelShutdownDirection of the Channel was shutdown before.

Attributes

Definition Classes
Inherited from:
AbstractChannel
final def isWritable: Boolean

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
final override def mountThreadId: Int

Attributes

Definition Classes
Inherited from:
AbstractChannel
override def notice(value: AnyRef): Unit

Attributes

Definition Classes
Inherited from:
AbstractChannel
final def open(file: File, opts: Seq[OpenOption], attrs: Seq[FileAttribute[_]], fu: ChannelFuture): ChannelFuture

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

  1. IllegalArgumentException - If the set contains an invalid combination of options
  2. UnsupportedOperationException – If the path is associated with a provider that does not support creating file channels, or an unsupported open option is specified.
  3. 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
  4. 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
def open(path: Path, opts: Seq[OpenOption], attrs: Seq[FileAttribute[_]], future: ChannelFuture): ChannelFuture

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

  1. IllegalArgumentException - If the set contains an invalid combination of options
  2. UnsupportedOperationException – If the path is associated with a provider that does not support creating file channels, or an unsupported open option is specified.
  3. 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
  4. 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
final override def pendingFutureSize: Int

Attributes

Definition Classes
Inherited from:
AbstractChannel
final override def pendingStackSize: Int

Attributes

Definition Classes
Inherited from:
AbstractChannel
override def pipeline: ChannelPipeline

Return the assigned ChannelPipeline.

Return the assigned ChannelPipeline.

Attributes

Definition Classes
Inherited from:
AbstractChannel
final def reactor: Reactor

Reactor of this actor system.

Reactor of this actor system.

Attributes

Inherited from:
Channel
def read(): ChannelAddress.this.type

Attributes

Inherited from:
ChannelAddress
def read(readPlan: ReadPlan): ChannelAddress.this.type

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
final def sendOutboundEvent(event: AnyRef): Unit

Attributes

Inherited from:
Channel
final protected def set(mask: Long, value: Boolean): Unit

Attributes

Inherited from:
CompressionBooleanLong
final def setAt(position: Int, value: Boolean): Unit

Attributes

Inherited from:
CompressionBooleanLong
final override def setOption[T](option: ChannelOption[T], value: T): 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.

UnsupportedOperationException

if the ChannelOption is not supported.

Definition Classes
Inherited from:
AbstractChannel
def setUnresolvedLocalAddress(address: SocketAddress): Unit

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
def setUnresolvedRemoteAddress(address: SocketAddress): Unit

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
final def timer: Timer

Timer of this actor system.

Timer of this actor system.

Attributes

Inherited from:
Channel
protected def toBinaryString(): String

Attributes

Inherited from:
CompressionBooleanLong
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Inherited from:
AbstractNetworkChannel
final override def writableBytes: Long

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.

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

Returns

the number of bytes that can be written before the Channel becomes unwritable.

Definition Classes
Inherited from:
AbstractNetworkChannel
final def write(msg: AnyRef, msgId: Long): Unit

Attributes

Inherited from:
Channel
final def write(msg: AnyRef): Unit

Attributes

Inherited from:
Channel
final def writeAndFlush(msg: AnyRef, msgId: Long): Unit

Attributes

Inherited from:
Channel
final def writeAndFlush(msg: AnyRef): Unit

Attributes

Inherited from:
Channel