Package java.nio.channels

Examples of java.nio.channels.IllegalSelectorException


      int interestOps, Object attachment) {

    if (!(channel instanceof ChannelUDT)) {
      // also takes care of null
      log.error("!(channel instanceof ChannelUDT)");
      throw new IllegalSelectorException();
    }

    synchronized (publicRegisteredKeySet) {

      if (publicRegisteredKeySet.size() == maximimSelectorSize) {
        log.error("reached maximimSelectorSize)");
        throw new IllegalSelectorException();
      }

      ChannelUDT channelUDT = (ChannelUDT) channel;

      SocketUDT socketUDT = channelUDT.getSocketUDT();
View Full Code Here


      throw new InvalidParameterException( pathId );
    }

    // check if path is valid
    if ( !isPathValid( path ) ) {
      throw new IllegalSelectorException();
    }

    // check if entity exists in repo
    RepositoryFile repositoryFile = getRepository().getFile( path );
View Full Code Here

   
    /**
     * @tests {@link java.nio.channels.IllegalSelectorException#IllegalSelectorException()}
     */
    public void test_Constructor() {
        IllegalSelectorException e = new IllegalSelectorException();
        assertNull(e.getMessage());
        assertNull(e.getLocalizedMessage());
        assertNull(e.getCause());
    }
View Full Code Here

    /**
     * @tests serialization/deserialization compatibility.
     */
    public void testSerializationSelf() throws Exception {

        SerializationTest.verifySelf(new IllegalSelectorException());
    }
View Full Code Here

    /**
     * @tests serialization/deserialization compatibility with RI.
     */
    public void testSerializationCompatibility() throws Exception {

        SerializationTest.verifyGolden(this, new IllegalSelectorException());
    }
View Full Code Here

     *      int, java.lang.Object)
     */
    protected SelectionKey register(AbstractSelectableChannel channel,
            int operations, Object attachment) {
        if (!provider().equals(channel.provider())) {
            throw new IllegalSelectorException();
        }
        synchronized (this) {
            synchronized (keys) {
                SelectionKey sk = new SelectionKeyImpl(channel, operations,
                        attachment, this);
View Full Code Here

                throw new IllegalBlockingModeException();
            }
            if (!selector.isOpen()) {
                if (0 == interestSet) {
                    // throw ISE exactly to keep consistency
                    throw new IllegalSelectorException();
                }
                // throw NPE exactly to keep consistency
                throw new NullPointerException();
            }
            if (0 == interestSet) {
                // throw ISE exactly to keep consistency
                throw new IllegalSelectorException();
            }
            SelectionKey key = keyFor(selector);
            if (null == key) {
                key = ((AbstractSelector) selector).register(this, interestSet,
                        attachment);
View Full Code Here

                throw new IllegalBlockingModeException();
            }
            if (!selector.isOpen()) {
                if (0 == interestSet) {
                    // throw ISE exactly to keep consistency
                    throw new IllegalSelectorException();
                }
                // throw NPE exactly to keep consistency
                throw new NullPointerException();
            }
            if (0 == interestSet) {
                // throw ISE exactly to keep consistency
                throw new IllegalSelectorException();
            }
            SelectionKey key = keyFor(selector);
            if (null == key) {
                key = ((AbstractSelector) selector).register(this, interestSet,
                        attachment);
View Full Code Here

     *      int, java.lang.Object)
     */
    protected SelectionKey register(AbstractSelectableChannel channel,
            int operations, Object attachment) {
        if (!provider().equals(channel.provider())) {
            throw new IllegalSelectorException();
        }
        synchronized (this) {
            synchronized (keys) {
                SelectionKey sk = new SelectionKeyImpl(channel, operations,
                        attachment, this);
View Full Code Here

     */
    @Override
    protected SelectionKey register(AbstractSelectableChannel channel,
            int operations, Object attachment) {
        if (!provider().equals(channel.provider())) {
            throw new IllegalSelectorException();
        }
        synchronized (this) {
            synchronized (unmodifiableKeys) {
                // create the key
                SelectionKeyImpl selectionKey = new SelectionKeyImpl(
View Full Code Here

TOP

Related Classes of java.nio.channels.IllegalSelectorException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.