Package java.nio.channels

Examples of java.nio.channels.IllegalSelectorException


                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

                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

     */
    @Override
    protected SelectionKey register(AbstractSelectableChannel channel,
            int operations, Object attachment) {
        if (!provider().equals(channel.provider())) {
            throw new IllegalSelectorException();
        }
        synchronized (this) {
            synchronized (keysSet) {

                // create the key
View Full Code Here

        players.add(new SeatedPlayer(p.getPlayerId(),p.getSeatId(),p.getName(),p.getStack(), p.getBet(), true, false));
        if(p.getSeatId().getId() == dealer.getDealer()){
          dealerId = p.getPlayerId();
        }
      }
      if(dealerId == null) throw new IllegalSelectorException();
      blindsDone.set(false);
      endLastRound.set(false);
      dispatch(new NewDealEvent(players, dealerId));
      dispatch(new NewRoundEvent(Round.PREFLOP, new Pots(0)));
    }
View Full Code Here

      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

    /**
     * @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 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

            return;

        if (contentType == null)
        {
            if (isWriting() && _characterEncoding != null)
                throw new IllegalSelectorException();

            if (_locale == null)
                _characterEncoding = null;
            _mimeType = null;
            _contentType = null;
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.