GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Overview
  • Use
  • Tree
  • Deprecated
  • Index
  • Search
  • Help
  • io.netty.channel.kqueue
  • AbstractKQueueStreamChannel

This view

  • Original page
  • New address

GeezerVison is showing netty.io — AbstractKQueueStreamChannel (Netty API Reference (4.1.141.Final))

Class AbstractKQueueStreamChannel

java.lang.Object
io.netty.util.DefaultAttributeMap
io.netty.channel.AbstractChannel
io.netty.channel.kqueue.AbstractKQueueStreamChannel
All Implemented Interfaces:
Channel, ChannelOutboundInvoker, DuplexChannel, UnixChannel, AttributeMap, Comparable<Channel>
Direct Known Subclasses:
KQueueDomainSocketChannel, KQueueSocketChannel

public abstract class AbstractKQueueStreamChannel extends AbstractChannel implements DuplexChannel
  • Nested Class Summary

    Nested classes/interfaces inherited from class AbstractChannel

    AbstractChannel.AbstractUnsafe
    Modifier and Type
    Class
    Description
    protected class 
    AbstractChannel.AbstractUnsafe
    Channel.Unsafe implementation which sub-classes must extend and use.

    Nested classes/interfaces inherited from interface Channel

    Channel.Unsafe
    Modifier and Type
    Interface
    Description
    static interface 
    Channel.Unsafe
    Unsafe operations that should never be called from user-code.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
    active
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static void
    checkResolvable(InetSocketAddress addr)
     
    abstract KQueueChannelConfig
    config()
    Returns the configuration of this channel.
    protected final void
    doBeginRead()
    Schedule a read operation.
    protected void
    doBind(SocketAddress local)
    Bind the Channel to the SocketAddress
    protected void
    doClose()
    Close the Channel
    protected boolean
    doConnect(SocketAddress remoteAddress, SocketAddress localAddress)
    Connect to the remote peer
    protected boolean
    doConnect0(SocketAddress remoteAddress, SocketAddress localAddress)
     
    protected void
    doDeregister()
    Deregister the Channel from its EventLoop.
    protected void
    doDisconnect()
    Disconnect this Channel from its remote peer
    protected final int
    doReadBytes(ByteBuf byteBuf)
    Read bytes into the given ByteBuf and return the amount.
    protected void
    doRegister()
    Is called after the Channel is registered with its EventLoop as part of the register process.
    protected final void
    doShutdownOutput()
    Called when conditions justify shutting down the output portion of the channel.
    protected void
    doWrite(ChannelOutboundBuffer in)
    Flush the content of the given buffer to the remote peer.
    protected final int
    doWriteBytes(ChannelOutboundBuffer in, ByteBuf buf)
     
    protected int
    doWriteSingle(ChannelOutboundBuffer in)
    Attempt to write a single object.
    final FileDescriptor
    fd()
    Returns the FileDescriptor that is used by this Channel.
    protected Object
    filterOutboundMessage(Object msg)
    Invoked when a new message is added to a ChannelOutboundBuffer of this AbstractChannel, so that the Channel implementation converts the message to another.
    boolean
    isActive()
    Return true if the Channel is active and so connected.
    protected boolean
    isCompatible(EventLoop loop)
    Return true if the given EventLoop is compatible with this instance.
    boolean
    isInputShutdown()
    Returns true if and only if the remote peer shut down its output so that no more data is received from this channel.
    boolean
    isOpen()
    Returns true if the Channel is open and may get active later
    boolean
    isOutputShutdown()
     
    boolean
    isShutdown()
    Determine if both the input and output of this channel have been shutdown.
    protected SocketAddress
    localAddress0()
    Returns the SocketAddress which is bound locally.
    ChannelMetadata
    metadata()
    Return the ChannelMetadata of the Channel which describe the nature of the Channel.
    protected final ByteBuf
    newDirectBuffer(ByteBuf buf)
    Returns an off-heap copy of the specified ByteBuf, and releases the original one.
    protected final ByteBuf
    newDirectBuffer(Object holder, ByteBuf buf)
    Returns an off-heap copy of the specified ByteBuf, and releases the specified holder.
    protected io.netty.channel.kqueue.AbstractKQueueChannel.AbstractKQueueUnsafe
    newUnsafe()
    Create a new AbstractChannel.AbstractUnsafe instance which will be used for the life-time of the Channel
    protected SocketAddress
    remoteAddress0()
    Return the SocketAddress which the Channel is connected to.
    ChannelFuture
    shutdown()
    Will shutdown the input and output sides of this channel.
    ChannelFuture
    shutdown(ChannelPromise promise)
    Will shutdown the input and output sides of this channel.
    ChannelFuture
    shutdownInput()
     
    ChannelFuture
    shutdownInput(ChannelPromise promise)
    Will shutdown the input and notify ChannelPromise.
    ChannelFuture
    shutdownOutput()
     
    ChannelFuture
    shutdownOutput(ChannelPromise promise)
    Will shutdown the output and notify ChannelPromise.

    Methods inherited from class AbstractChannel

    alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, equals, eventLoop, fileChannel, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, maxMessagesPerWrite, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, toString, unsafe, validateFileRegion, voidPromise, write, write, writeAndFlush, writeAndFlush
    Modifier and Type
    Method
    Description
    ByteBufAllocator
    alloc()
    Return the assigned ByteBufAllocator which will be used to allocate ByteBufs.
    ChannelFuture
    bind(SocketAddress localAddress)
    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.
    ChannelFuture
    bind(SocketAddress localAddress, ChannelPromise promise)
    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.
    long
    bytesBeforeUnwritable()
    Get how many bytes can be written until Channel.isWritable() returns false.
    long
    bytesBeforeWritable()
    Get how many bytes must be drained from underlying buffers until Channel.isWritable() returns true.
    ChannelFuture
    close()
    Request to close the Channel and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error.
    ChannelFuture
    close(ChannelPromise promise)
    Request to close the Channel and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error.
    ChannelFuture
    closeFuture()
    Returns the ChannelFuture which will be notified when this channel is closed.
    final int
    compareTo(Channel o)
     
    ChannelFuture
    connect(SocketAddress remoteAddress)
    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.
    ChannelFuture
    connect(SocketAddress remoteAddress, ChannelPromise promise)
    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.
    ChannelFuture
    connect(SocketAddress remoteAddress, SocketAddress localAddress)
    Request to connect to the given SocketAddress while bind to the localAddress and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error.
    ChannelFuture
    connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise)
    Request to connect to the given SocketAddress while bind to the localAddress and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error.
    ChannelFuture
    deregister()
    Request to deregister from the previous assigned EventExecutor and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error.
    ChannelFuture
    deregister(ChannelPromise promise)
    Request to deregister from the previous assigned EventExecutor and notify the ChannelFuture once the operation completes, either because the operation was successful or because of an error.
    ChannelFuture
    disconnect()
    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.
    ChannelFuture
    disconnect(ChannelPromise promise)
    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.
    final boolean
    equals(Object o)
    Returns true if and only if the specified object is identical with this channel (i.e: this == o).
    EventLoop
    eventLoop()
    Return the EventLoop this Channel was registered to.
    protected FileChannel
    fileChannel(DefaultFileRegion region)
    Returns the underlying FileChannel, or null if the region is not open.
    Channel
    flush()
    Request to flush all pending messages via this ChannelOutboundInvoker.
    final int
    hashCode()
    Returns the ID of this channel.
    final ChannelId
    id()
    Returns the globally unique identifier of this Channel.
    protected void
    invalidateLocalAddress()
    Deprecated.
    no use-case for this.
    protected void
    invalidateRemoteAddress()
    Deprecated.
    no use-case for this.
    boolean
    isRegistered()
    Returns true if the Channel is registered with an EventLoop.
    boolean
    isWritable()
    Returns true if and only if the I/O thread will perform the requested write operation immediately.
    SocketAddress
    localAddress()
    Returns the local address where this channel is bound to.
    protected final int
    maxMessagesPerWrite()
     
    protected DefaultChannelPipeline
    newChannelPipeline()
    Returns a new DefaultChannelPipeline instance.
    ChannelFuture
    newFailedFuture(Throwable cause)
    Create a new ChannelFuture which is marked as failed already.
    protected ChannelId
    newId()
    Returns a new DefaultChannelId instance.
    ChannelProgressivePromise
    newProgressivePromise()
    Return an new ChannelProgressivePromise
    ChannelPromise
    newPromise()
    Return a new ChannelPromise.
    ChannelFuture
    newSucceededFuture()
    Create a new ChannelFuture which is marked as succeeded already.
    Channel
    parent()
    Returns the parent of this channel.
    ChannelPipeline
    pipeline()
    Return the assigned ChannelPipeline.
    Channel
    read()
    Request to Read data from the Channel into the first inbound buffer, triggers an ChannelInboundHandler.channelRead(ChannelHandlerContext, Object) event if data was read, and triggers a channelReadComplete event so the handler can decide to continue reading.
    SocketAddress
    remoteAddress()
    Returns the remote address where this channel is connected to.
    String
    toString()
    Returns the String representation of this channel.
    Channel.Unsafe
    unsafe()
    Returns an internal-use-only object that provides unsafe operations.
    protected void
    validateFileRegion(DefaultFileRegion region, long position)
     
    final ChannelPromise
    voidPromise()
    Return a special ChannelPromise which can be reused for different operations.
    ChannelFuture
    write(Object msg)
    Request to write a message via this ChannelHandlerContext through the ChannelPipeline.
    ChannelFuture
    write(Object msg, ChannelPromise promise)
    Request to write a message via this ChannelHandlerContext through the ChannelPipeline.
    ChannelFuture
    writeAndFlush(Object msg)
    Shortcut for call ChannelOutboundInvoker.write(Object) and ChannelOutboundInvoker.flush().
    ChannelFuture
    writeAndFlush(Object msg, ChannelPromise promise)
    Shortcut for call ChannelOutboundInvoker.write(Object, ChannelPromise) and ChannelOutboundInvoker.flush().

    Methods inherited from class DefaultAttributeMap

    attr, hasAttr
    Modifier and Type
    Method
    Description
    <T> Attribute<T>
    attr(AttributeKey<T> key)
    Get the Attribute for the given AttributeKey.
    <T> boolean
    hasAttr(AttributeKey<T> key)
    Returns true if and only if the given Attribute exists in this AttributeMap.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • active

      protected volatile boolean active
  • Method Details

    • newUnsafe

      protected io.netty.channel.kqueue.AbstractKQueueChannel.AbstractKQueueUnsafe newUnsafe()
      Description copied from class: AbstractChannel
      Create a new AbstractChannel.AbstractUnsafe instance which will be used for the life-time of the Channel
    • metadata

      public ChannelMetadata metadata()
      Description copied from interface: Channel
      Return the ChannelMetadata of the Channel which describe the nature of the Channel.
      Specified by:
      metadata in interface Channel
    • doWrite

      protected void doWrite(ChannelOutboundBuffer in) throws Exception
      Description copied from class: AbstractChannel
      Flush the content of the given buffer to the remote peer.
      Specified by:
      doWrite in class AbstractChannel
      Throws:
      Exception
    • doWriteSingle

      protected int doWriteSingle(ChannelOutboundBuffer in) throws Exception
      Attempt to write a single object.
      Parameters:
      in - the collection which contains objects to write.
      Returns:
      The value that should be decremented from the write quantum which starts at ChannelConfig.getWriteSpinCount(). The typical use cases are as follows:
      • 0 - if no write was attempted. This is appropriate if an empty ByteBuf (or other empty content) is encountered
      • 1 - if a single call to write data was made to the OS
      • ChannelUtils.WRITE_STATUS_SNDBUF_FULL - if an attempt to write data was made to the OS, but no data was accepted
      Throws:
      Exception - If an I/O error occurs.
    • filterOutboundMessage

      protected Object filterOutboundMessage(Object msg)
      Description copied from class: AbstractChannel
      Invoked when a new message is added to a ChannelOutboundBuffer of this AbstractChannel, so that the Channel implementation converts the message to another. (e.g. heap buffer -> direct buffer)
      Overrides:
      filterOutboundMessage in class AbstractChannel
    • doShutdownOutput

      @UnstableApi protected final void doShutdownOutput() throws Exception
      Description copied from class: AbstractChannel
      Called when conditions justify shutting down the output portion of the channel. This may happen if a write operation throws an exception.
      Overrides:
      doShutdownOutput in class AbstractChannel
      Throws:
      Exception
    • isOutputShutdown

      public boolean isOutputShutdown()
      Specified by:
      isOutputShutdown in interface DuplexChannel
      See Also:
      • Socket.isOutputShutdown()
    • isInputShutdown

      public boolean isInputShutdown()
      Description copied from interface: DuplexChannel
      Returns true if and only if the remote peer shut down its output so that no more data is received from this channel. Note that the semantic of this method is different from that of Socket.shutdownInput() and Socket.isInputShutdown().
      Specified by:
      isInputShutdown in interface DuplexChannel
    • isShutdown

      public boolean isShutdown()
      Description copied from interface: DuplexChannel
      Determine if both the input and output of this channel have been shutdown.
      Specified by:
      isShutdown in interface DuplexChannel
    • shutdownOutput

      public ChannelFuture shutdownOutput()
      Specified by:
      shutdownOutput in interface DuplexChannel
      See Also:
      • Socket.shutdownOutput()
    • shutdownOutput

      public ChannelFuture shutdownOutput(ChannelPromise promise)
      Description copied from interface: DuplexChannel
      Will shutdown the output and notify ChannelPromise.
      Specified by:
      shutdownOutput in interface DuplexChannel
      See Also:
      • Socket.shutdownOutput()
    • shutdownInput

      public ChannelFuture shutdownInput()
      Specified by:
      shutdownInput in interface DuplexChannel
      See Also:
      • Socket.shutdownInput()
    • shutdownInput

      public ChannelFuture shutdownInput(ChannelPromise promise)
      Description copied from interface: DuplexChannel
      Will shutdown the input and notify ChannelPromise.
      Specified by:
      shutdownInput in interface DuplexChannel
      See Also:
      • Socket.shutdownInput()
    • shutdown

      public ChannelFuture shutdown()
      Description copied from interface: DuplexChannel
      Will shutdown the input and output sides of this channel.
      Specified by:
      shutdown in interface DuplexChannel
      Returns:
      will be completed when both shutdown operations complete.
    • shutdown

      public ChannelFuture shutdown(ChannelPromise promise)
      Description copied from interface: DuplexChannel
      Will shutdown the input and output sides of this channel.
      Specified by:
      shutdown in interface DuplexChannel
      Parameters:
      promise - will be completed when both shutdown operations complete.
      Returns:
      will be completed when both shutdown operations complete.
    • fd

      public final FileDescriptor fd()
      Description copied from interface: UnixChannel
      Returns the FileDescriptor that is used by this Channel.
      Specified by:
      fd in interface UnixChannel
    • isActive

      public boolean isActive()
      Description copied from interface: Channel
      Return true if the Channel is active and so connected.
      Specified by:
      isActive in interface Channel
    • doClose

      protected void doClose() throws Exception
      Description copied from class: AbstractChannel
      Close the Channel
      Specified by:
      doClose in class AbstractChannel
      Throws:
      Exception
    • doDisconnect

      protected void doDisconnect() throws Exception
      Description copied from class: AbstractChannel
      Disconnect this Channel from its remote peer
      Specified by:
      doDisconnect in class AbstractChannel
      Throws:
      Exception
    • isCompatible

      protected boolean isCompatible(EventLoop loop)
      Description copied from class: AbstractChannel
      Return true if the given EventLoop is compatible with this instance.
      Specified by:
      isCompatible in class AbstractChannel
    • isOpen

      public boolean isOpen()
      Description copied from interface: Channel
      Returns true if the Channel is open and may get active later
      Specified by:
      isOpen in interface Channel
    • doDeregister

      protected void doDeregister() throws Exception
      Description copied from class: AbstractChannel
      Deregister the Channel from its EventLoop. Sub-classes may override this method
      Overrides:
      doDeregister in class AbstractChannel
      Throws:
      Exception
    • doBeginRead

      protected final void doBeginRead() throws Exception
      Description copied from class: AbstractChannel
      Schedule a read operation.
      Specified by:
      doBeginRead in class AbstractChannel
      Throws:
      Exception
    • doRegister

      protected void doRegister() throws Exception
      Description copied from class: AbstractChannel
      Is called after the Channel is registered with its EventLoop as part of the register process. Sub-classes may override this method
      Overrides:
      doRegister in class AbstractChannel
      Throws:
      Exception
    • config

      public abstract KQueueChannelConfig config()
      Description copied from interface: Channel
      Returns the configuration of this channel.
      Specified by:
      config in interface Channel
    • newDirectBuffer

      protected final ByteBuf newDirectBuffer(ByteBuf buf)
      Returns an off-heap copy of the specified ByteBuf, and releases the original one.
    • newDirectBuffer

      protected final ByteBuf newDirectBuffer(Object holder, ByteBuf buf)
      Returns an off-heap copy of the specified ByteBuf, and releases the specified holder. The caller must ensure that the holder releases the original ByteBuf when the holder is released by this method.
    • checkResolvable

      protected static void checkResolvable(InetSocketAddress addr)
    • doReadBytes

      protected final int doReadBytes(ByteBuf byteBuf) throws Exception
      Read bytes into the given ByteBuf and return the amount.
      Throws:
      Exception
    • doWriteBytes

      protected final int doWriteBytes(ChannelOutboundBuffer in, ByteBuf buf) throws Exception
      Throws:
      Exception
    • doBind

      protected void doBind(SocketAddress local) throws Exception
      Description copied from class: AbstractChannel
      Bind the Channel to the SocketAddress
      Specified by:
      doBind in class AbstractChannel
      Throws:
      Exception
    • doConnect

      protected boolean doConnect(SocketAddress remoteAddress, SocketAddress localAddress) throws Exception
      Connect to the remote peer
      Throws:
      Exception
    • doConnect0

      protected boolean doConnect0(SocketAddress remoteAddress, SocketAddress localAddress) throws Exception
      Throws:
      Exception
    • localAddress0

      protected SocketAddress localAddress0()
      Description copied from class: AbstractChannel
      Returns the SocketAddress which is bound locally.
      Specified by:
      localAddress0 in class AbstractChannel
    • remoteAddress0

      protected SocketAddress remoteAddress0()
      Description copied from class: AbstractChannel
      Return the SocketAddress which the Channel is connected to.
      Specified by:
      remoteAddress0 in class AbstractChannel
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.