cc.otavia.core.channel
Members list
Packages
Type members
Classlikes
Abstract class of file channel and network channel.
Abstract class of file channel and network channel.
Attributes
- Companion
- object
- Supertypes
-
trait QueueMapEntitytrait ChannelStatetrait CompressionBooleanLongtrait Channeltrait ChannelAddressclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class AbstractFileChannelclass NioFileChannelclass AbstractNetworkChannelclass AbstractDatagramChannelclass NioDatagramChannelclass AbstractServerChannelclass NioServerSocketChannelclass AbstractSocketChannelclass NioSocketChannelShow all
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
AbstractChannel.type
Attributes
- Supertypes
-
class AbstractNetworkChannelclass AbstractChanneltrait QueueMapEntitytrait ChannelStatetrait CompressionBooleanLongtrait Channeltrait ChannelAddressclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class NioDatagramChannel
Abstract channel for file, support aio.
Abstract channel for file, support aio.
Attributes
- Supertypes
-
class AbstractChanneltrait QueueMapEntitytrait ChannelStatetrait CompressionBooleanLongtrait Channeltrait ChannelAddressclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class NioFileChannel
Attributes
- Companion
- object
- Supertypes
-
class AbstractChanneltrait QueueMapEntitytrait ChannelStatetrait CompressionBooleanLongtrait Channeltrait ChannelAddressclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class AbstractDatagramChannelclass NioDatagramChannelclass AbstractServerChannelclass NioServerSocketChannelclass AbstractSocketChannelclass NioSocketChannelShow all
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Attributes
- Supertypes
-
class AbstractNetworkChannelclass AbstractChanneltrait QueueMapEntitytrait ChannelStatetrait CompressionBooleanLongtrait Channeltrait ChannelAddressclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class NioServerSocketChannel
Attributes
- Supertypes
-
class AbstractNetworkChannelclass AbstractChanneltrait QueueMapEntitytrait ChannelStatetrait CompressionBooleanLongtrait Channeltrait ChannelAddressclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class NioSocketChannel
The AbstractChannel in Reactor
The AbstractChannel in Reactor
Attributes
- Supertypes
-
trait ChannelStatetrait CompressionBooleanLongtrait UnsafeChannelclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class AbstractNioUnsafeChannel[C]class NioUnsafeDatagramChannelclass NioUnsafeSocketChannelclass NioUnsafeFileChannel
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
trait DatagramChannelclass AbstractChannelclass AbstractFileChannelclass NioFileChannelclass AbstractNetworkChannelclass AbstractDatagramChannelclass NioDatagramChannelclass AbstractServerChannelclass NioServerSocketChannelclass AbstractSocketChannelclass NioSocketChanneltrait ServerChannelShow all
An interface for Channel used in Actor
An interface for Channel used in Actor
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait Channeltrait DatagramChannelclass AbstractChannelclass AbstractFileChannelclass NioFileChannelclass AbstractNetworkChannelclass AbstractDatagramChannelclass NioDatagramChannelclass AbstractServerChannelclass NioServerSocketChannelclass AbstractSocketChannelclass NioSocketChanneltrait ServerChannelShow all
- Self type
A RuntimeException which is thrown when an I/O operation fails.
A RuntimeException which is thrown when an I/O operation fails.
Attributes
- Supertypes
-
class RuntimeExceptionclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class ChannelPipelineException
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Handles an I/O event or intercepts an I/O operation, and forwards it to its next handler in its ChannelPipeline. ===The context object=== A ChannelHandler is provided with a ChannelHandlerContext object. A ChannelHandler is supposed to interact with the ChannelPipeline it belongs to via a context object. Using the context object, the ChannelHandler can pass events upstream or downstream, modify the pipeline dynamically, or store the information (using AttributeKeys) which is specific to the handler. ===State management=== A ChannelHandler often needs to store some stateful information. The simplest and recommended approach is to use member variables:
Handles an I/O event or intercepts an I/O operation, and forwards it to its next handler in its ChannelPipeline. ===The context object=== A ChannelHandler is provided with a ChannelHandlerContext object. A ChannelHandler is supposed to interact with the ChannelPipeline it belongs to via a context object. Using the context object, the ChannelHandler can pass events upstream or downstream, modify the pipeline dynamically, or store the information (using AttributeKeys) which is specific to the handler. ===State management=== A ChannelHandler often needs to store some stateful information. The simplest and recommended approach is to use member variables:
trait Msg {
// your methods here
}
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait Byte2ByteDecodertrait Byte2ByteCodecclass ByteToByteCodecclass SslHandlerclass ByteToByteDecoderclass Base64Decodertrait Byte2ByteEncoderclass ByteToByteEncoderclass Base64Encodertrait Byte2MessageDecoderclass ByteToMessageCodecclass ByteToMessageDecoderclass ByteArrayDecoderclass StringDecoderclass FixedLengthFrameDecodertrait Message2ByteEncoderclass MessageToByteEncoderclass ByteArrayEncoderclass LineEncoderclass StringEncodertrait Message2MessageDecodertrait Message2MessageCodectrait Message2MessageEncoderclass ChannelHandlerAdapterclass ChannelInitializer[C]class IdleStateHandlerShow all
Attributes
- Supertypes
- Known subtypes
-
class ByteToByteCodecclass SslHandlerclass ByteToByteDecoderclass Base64Decoderclass ByteToByteEncoderclass Base64Encoderclass ByteToMessageCodecclass ByteToMessageDecoderclass ByteArrayDecoderclass StringDecoderclass FixedLengthFrameDecoderclass MessageToByteEncoderclass ByteArrayEncoderclass LineEncoderclass StringEncoderShow all
Attributes
- Supertypes
- Known subtypes
Attributes
- Companion
- object
- Supertypes
-
trait ChannelHandlerContexttrait ChannelInboundInvokertrait ChannelOutboundInvokerclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ChannelInflight.type
A special ChannelHandler which offers an easy way to initialize a Channel once it was registered to its ChannelsActor. Implementations are most often used in the context of ChannelsActor.handler, to setup the ChannelPipeline of a Channel.
A special ChannelHandler which offers an easy way to initialize a Channel once it was registered to its ChannelsActor. Implementations are most often used in the context of ChannelsActor.handler, to setup the ChannelPipeline of a Channel.
class MyChannelInitializer extends ChannelInitializer[Channel] {
override protected def initChannel(ch: Channel): Unit = {
ch.pipeline.addLast("myHandler", new MyHandler())
}
}
Be aware that this class is marked as isSharable and so the implementation must be safe to be re-used
Type parameters
- C
-
A sub-type of Channel
Attributes
- Supertypes
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class NioChannelOption[T]
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ChannelOption.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Used to fail pending writes when a channel's output has been shutdown.
Used to fail pending writes when a channel's output has been shutdown.
Attributes
- Supertypes
-
class IOExceptionclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
- Known subtypes
-
class ChannelPipelineImpl
A ChannelException which is thrown when a ChannelPipeline failed to execute an operation.
A ChannelException which is thrown when a ChannelPipeline failed to execute an operation.
Attributes
- Supertypes
-
class ChannelExceptionclass RuntimeExceptionclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- object
- Supertypes
-
trait ChannelPipelinetrait ChannelOutboundInvokertrait ChannelInboundInvokerclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ChannelPipelineImpl.type
The direction of a shutdown. Depending on the direction this has different meaning. If the Inbound direction is shutdown, no more data is read from the transport and dispatched. If the Outbound direction is shutdown, no more writes will be possible to the transport and so all writes will fail.
The direction of a shutdown. Depending on the direction this has different meaning. If the Inbound direction is shutdown, no more data is read from the transport and dispatched. If the Outbound direction is shutdown, no more writes will be possible to the transport and so all writes will fail.
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A trait for manage lifecycle for Channel
A trait for manage lifecycle for Channel
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
class AbstractChannelclass AbstractFileChannelclass NioFileChannelclass AbstractNetworkChannelclass AbstractDatagramChannelclass NioDatagramChannelclass AbstractServerChannelclass NioServerSocketChannelclass AbstractSocketChannelclass NioSocketChannelclass AbstractUnsafeChannelclass AbstractNioUnsafeChannel[C]class NioUnsafeDatagramChannelclass NioUnsafeSocketChannelclass NioUnsafeFileChannelShow all
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ChannelState.type
Combines the inbound handling of one ChannelHandler with the outbound handling of another ChannelHandler.
Combines the inbound handling of one ChannelHandler with the outbound handling of another ChannelHandler.
Attributes
- Companion
- object
- Supertypes
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Attributes
- Supertypes
-
class ConnectExceptionclass SocketExceptionclass IOExceptionclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Default FileRegion implementation which transfer data from a FileChannel or File. Be aware that the FileChannel will be automatically closed once FileRegion.refCnt returns 0.
Default FileRegion implementation which transfer data from a FileChannel or File. Be aware that the FileChannel will be automatically closed once FileRegion.refCnt returns 0.
Value parameters
- count
-
the number of bytes to transfer
- position
-
the position from which the transfer should start
Attributes
- Supertypes
-
trait FileRegionclass AbstractReferenceCountedtrait ReferenceCountedclass Objecttrait Matchableclass AnyShow all
A region of a file that is sent via a Channel which supports zero-copy file transfer.
A region of a file that is sent via a Channel which supports zero-copy file transfer.
=== Upgrade your JDK / JRE ===
java.nio.channels.FileChannel.transferTo has at least four known bugs in the old versions of Sun JDK and perhaps its derived ones. Please upgrade your JDK to 1.6.0_18 or later version if you are going to use zero-copy file transfer.
- 5103988
- FileChannel.transferTo() should return -1 for EAGAIN instead throws IOException
- 6253145
- FileChannel.transferTo() on Linux fails when going beyond 2GB boundary
- 6427312
- FileChannel.transferTo() throws IOException "system call interrupted"
- 6470086
- FileChannel.transferTo(2147483647, 1, channel) causes "Value too large" exception
=== Check your operating system and JDK / JRE ===
If your operating system (or JDK / JRE) does not support zero-copy file transfer, sending a file with FileRegion might fail or yield worse performance. For example, sending a large file doesn't work well in Windows.
=== Not all transports support it ===
Attributes
- Supertypes
-
trait ReferenceCountedclass Objecttrait Matchableclass Any
- Known subtypes
-
class DefaultFileRegion
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:
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
- Supertypes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class AbstractUnsafeChannelclass AbstractNioUnsafeChannel[C]class NioUnsafeDatagramChannelclass NioUnsafeSocketChannelclass NioUnsafeFileChanneltrait NioUnsafeChannelShow all