List of usage examples for io.netty.channel EventLoopException EventLoopException
public EventLoopException(Throwable cause)
From source file:org.fusesource.hawtdispatch.netty.HawtEventLoop.java
License:Apache License
@Override public ChannelFuture register(final Channel channel, final ChannelPromise promise) { if (isShutdown()) { channel.unsafe().closeForcibly(); promise.setFailure(new EventLoopException("cannot register a channel to a shut down loop")); return promise; }/* ww w . j a va 2 s . c o m*/ if (inEventLoop()) { channel.unsafe().register(this, promise); } else { execute(new Runnable() { @Override public void run() { channel.unsafe().register(HawtEventLoop.this, promise); } }); } return promise; }