Package java.nio.channels

Examples of java.nio.channels.ClosedSelectorException


        return unmodifiableKeys;
    }

    private void closeCheck() {
        if (!isOpen()) {
            throw new ClosedSelectorException();
        }
    }
View Full Code Here


    /*
     * Checks that the receiver is not closed. If it is throws an exception.
     */
    private void closeCheck() {
        if (!isOpen()) {
            throw new ClosedSelectorException();
        }
    }
View Full Code Here

    int null_loop_count = 0;

    while (true) {
      // Selector must be open
      if (!selector_.isOpen()) {
        throw new ClosedSelectorException();
      }

      // Handle any keys which need updated interest ops
      int async_ops_count = 0;
      int async_ops_valid = 0;
View Full Code Here

  @SuppressWarnings("unchecked")
  @Override
  public Set<SelectionKey> keys() {
    if (!isOpen()) {
      throw new ClosedSelectorException();
    }
    return (Set<SelectionKey>) publicRegisteredKeySet;
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  @Override
  public Set<SelectionKey> selectedKeys() {
    if (!isOpen()) {
      throw new ClosedSelectorException();
    }
    return (Set<SelectionKey>) publicSelectedKeySet;
  }
View Full Code Here

  public static int UDT_TIMEOUT_NONE = 0;

  private final int doSelectInsideLock(long millisTimeout) throws IOException {
    if (!isOpen()) {
      throw new ClosedSelectorException();
    }
    synchronized (this) {
      synchronized (publicRegisteredKeySet) {
        synchronized (publicSelectedKeySet) {
          return doSelectReally(millisTimeout);
View Full Code Here

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

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

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

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

  @SuppressWarnings("unchecked")
  @Override
  public Set<SelectionKey> keys() {
    if (!isOpen()) {
      throw new ClosedSelectorException();
    }
    return (Set<SelectionKey>) publicRegisteredKeySet;
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  @Override
  public Set<SelectionKey> selectedKeys() {
    if (!isOpen()) {
      throw new ClosedSelectorException();
    }
    return (Set<SelectionKey>) publicSelectedKeySet;
  }
View Full Code Here

TOP

Related Classes of java.nio.channels.ClosedSelectorException

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.