Examples of eventLoop()


Examples of io.netty.channel.local.LocalChannel.eventLoop()

            }
        }, 1, TimeUnit.SECONDS);

        assertTrue(((PausableEventExecutor) channel.eventLoop()).isAcceptingNewTasks());
        ChannelFuture deregisterFuture = channel.deregister();
        assertFalse(((PausableEventExecutor) channel.eventLoop()).isAcceptingNewTasks());

        assertTrue(deregisterFuture.sync().isSuccess());

        Thread.sleep(1000);
View Full Code Here

Examples of io.netty.channel.local.LocalChannel.eventLoop()

        registerPromise = channel.newPromise();
        assertFalse(oneTimeScheduledTaskExecuted.get());
        channel.unsafe().register(loopB, registerPromise);
        registerPromise.sync();

        assertThat(channel.eventLoop(), instanceOf(PausableEventExecutor.class));
        assertSame(loopB, ((PausableEventExecutor) channel.eventLoop()).unwrap());

        assertTrue(scheduleFuture.sync().isSuccess());
        assertTrue(oneTimeScheduledTaskExecuted.get());
    }
View Full Code Here

Examples of io.netty.channel.local.LocalChannel.eventLoop()

        assertFalse(oneTimeScheduledTaskExecuted.get());
        channel.unsafe().register(loopB, registerPromise);
        registerPromise.sync();

        assertThat(channel.eventLoop(), instanceOf(PausableEventExecutor.class));
        assertSame(loopB, ((PausableEventExecutor) channel.eventLoop()).unwrap());

        assertTrue(scheduleFuture.sync().isSuccess());
        assertTrue(oneTimeScheduledTaskExecuted.get());
    }
View Full Code Here

Examples of io.netty.channel.socket.SocketChannel.eventLoop()

    int backlog = getEnvironment().getProperty("reactor.tcp.connectionReactorBacklog", Integer.class, 128);

    return new NettyNetChannel<IN, OUT>(
        getEnvironment(),
        getCodec(),
        new NettyEventLoopDispatcher(ch.eventLoop(), backlog),
        getReactor(),
        ch
    );
  }
View Full Code Here

Examples of net.minecraft.util.io.netty.channel.Channel.eventLoop()

   */
  protected void unprocessBootstrap(ChannelFuture future) {
    final Channel channel = future.channel();
   
    // For thread safety - see ChannelInjector.close()
    channel.eventLoop().submit(new Callable<Object>() {
      @Override
      public Object call() throws Exception {
        channel.pipeline().remove(handler);
        return null;
      }
View Full Code Here

Examples of net.minecraft.util.io.netty.channel.Channel.eventLoop()

    public static void unbind(Player player) {
      Object entityPlayer = Conversion.toEntityHandle.convert(player);
      Object playerConnection = EntityPlayerRef.playerConnection.get(entityPlayer);
      Object networkManager = PlayerConnectionRef.networkManager.get(playerConnection);
      final Channel channel = NetworkManagerRef.channel.get(networkManager);
      channel.eventLoop().submit(new Callable<Object>() {

        @Override
        public Object call() throws Exception {
          channel.pipeline().remove("bkcommonlib");
          return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.