IT. Expert System.

Android Reference

AbstractSelectableChannel


java.nio.channels.spi

Class AbstractSelectableChannel

    • Constructor Detail

      • AbstractSelectableChannel

        protected AbstractSelectableChannel(SelectorProvider selectorProvider)
        Constructs a new AbstractSelectableChannel.
        Parameters:
        selectorProvider - the selector provider that creates this channel.
    • Method Detail

      • isRegistered

        public final boolean isRegistered()
        Indicates whether this channel is registered with one or more selectors.
        Specified by:
        isRegistered in class SelectableChannel
        Returns:
        true if this channel is registered with a selector, false otherwise.
      • keyFor

        public final SelectionKey keyFor(Selector selector)
        Gets this channel's selection key for the specified selector.
        Specified by:
        keyFor in class SelectableChannel
        Parameters:
        selector - the selector with which this channel has been registered.
        Returns:
        the selection key for the channel or null if this channel has not been registered with selector.
      • register

        public final SelectionKey register(Selector selector,
                            int interestSet,
                            Object attachment)
                                    throws ClosedChannelException
        Registers this channel with the specified selector for the specified interest set. If the channel is already registered with the selector, the interest set is updated to interestSet and the corresponding selection key is returned. If the channel is not yet registered, this method calls the register method of selector and adds the selection key to this channel's key set.
        Specified by:
        register in class SelectableChannel
        Parameters:
        selector - the selector with which to register this channel.
        interestSet - this channel's interest set.
        attachment - the object to attach, can be null.
        Returns:
        the selection key for this registration.
        Throws:
        CancelledKeyException - if this channel is registered but its key has been canceled.
        ClosedChannelException - if this channel is closed.
        IllegalArgumentException - if interestSet is not supported by this channel.
        IllegalBlockingModeException - if this channel is in blocking mode.
        IllegalSelectorException - if this channel does not have the same provider as the given selector.
      • implCloseChannel

        protected final void implCloseChannel()
                                       throws IOException
        Implements the channel closing behavior. Calls implCloseSelectableChannel() first, then loops through the list of selection keys and cancels them, which unregisters this channel from all selectors it is registered with.
        Specified by:
        implCloseChannel in class AbstractInterruptibleChannel
        Throws:
        IOException - if a problem occurs while closing the channel.
      • implCloseSelectableChannel

        protected abstract void implCloseSelectableChannel()
                                                    throws IOException
        Implements the closing function of the SelectableChannel. This method is called from implCloseChannel().
        Throws:
        IOException - if an I/O exception occurs.
      • isBlocking

        public final boolean isBlocking()
        Indicates whether this channel is in blocking mode.
        Specified by:
        isBlocking in class SelectableChannel
        Returns:
        true if this channel is blocking, false otherwise.
      • blockingLock

        public final Object blockingLock()
        Gets the object used for the synchronization of register and configureBlocking.
        Specified by:
        blockingLock in class SelectableChannel
        Returns:
        the synchronization object.
      • implConfigureBlocking

        protected abstract void implConfigureBlocking(boolean blocking)
                                               throws IOException
        Implements the configuration of blocking/non-blocking mode.
        Parameters:
        blocking - true for blocking, false for non-blocking.
        Throws:
        IOException - if an I/O error occurs.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 16013 / . Delta: 0.02712 с