101102103104105106107108109110111
} @Override public Void get() throws InterruptedException, ExecutionException { future.await(); if (!future.isSuccess()) { throw new ExecutionException(future.getCause()); } return null; }
112113114115116117118119120121122
@Override public Void get(long arg0, TimeUnit arg1) throws InterruptedException, ExecutionException, TimeoutException { if (future.await(arg0, arg1)) { if (!future.isSuccess()) { throw new ExecutionException(future.getCause()); } return null; }
329330331332333334335336337338339
if (_channel != null && _channel.isOpen()) try { ChannelFuture cf = _channel.close(); getLog().info("controller close session"); cf.await(1000); } catch (InterruptedException e) { e.printStackTrace(); getLog().info("session close wait interrupted in JVMController");
294295296297298299300301302303304
// Start the connection attempt. ChannelFuture future = bootstrap.connect(new InetSocketAddress(host.getName(), host.getPort())); try { future.await(10000); connected = future.isSuccess(); if (connected) {
866867868869870871872873874875876
if (_session != null && _session.isConnected() && !_stopping && !_appearHanging) { ChannelFuture future = _session.write(new Message(Constants.WRAPPER_MSG_PING, null)); try { future.await(10000); } catch (InterruptedException e) { e.printStackTrace(); }
917918919920921922923924925926927
if (_debug) log.fine("connecting to port " + _port); final ChannelFuture future1 = connector.connect(); try { future1.await(); _started = future1.isSuccess(); } catch (InterruptedException e1) { // TODO Auto-generated catch block
96979899100101102103104105106
{ super.flush(); if (future == null) { ChannelFuture f = sendDownstream(null); f.await(20000); //if (!f.await(10000)) // throw new IOException("write longer than 10 secs"); } else {
165166167168169170171172173174175
// first send session and wait until it has been transmitted ChannelFuture future = Channels.future(ctx.getChannel()); Channels.write(ctx, future, ChannelBuffers.wrappedBuffer(session.getId().getBytes())); try { future.await(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace();
604605606607608609610611612613614
266267268269270271272273274275276
ChannelFuture writeFuture = childChannel.write(response); if (timeoutMillis > 0) { try { writeFuture.await(timeoutMillis); } catch (InterruptedException e) { //NOOP }