@Override public Channel getChannel() throws IOException { final Channel channel = super.getChannel(); if(channel == null) { // Fail fast, don't try to await a new channel throw channelClosed(); } return channel; }
@Override public Channel getChannel() throws IOException { final Channel channel = super.getChannel(); if(channel == null) { // Fail fast, don't try to await a new channel throw ProtocolMessages.MESSAGES.channelClosed(); } return channel; }
@Override public Channel getChannel() throws IOException { final Channel channel = super.getChannel(); if(channel == null) { // Fail fast, don't try to await a new channel throw channelClosed(); } return channel; }
@Override public Channel getChannel() throws IOException { final Channel channel = super.getChannel(); if(channel == null) { // Fail fast, don't try to await a new channel throw ProtocolMessages.MESSAGES.channelClosed(); } return channel; }
@Override public Channel getChannel() throws IOException { Channel channel = super.getChannel(); if(channel != null) { return channel; } // Try to connect and wait for the channel connectionManager.connect(); // In case connect did not succeed the next getChannel() call needs to try to reconnect channel = super.getChannel(); if(channel == null) { throw ProtocolMessages.MESSAGES.channelClosed(); } return channel; }
@Override public Channel getChannel() throws IOException { Channel channel = super.getChannel(); if(channel != null) { return channel; } // Try to connect and wait for the channel synchronized (connectionManager) { deadline = System.currentTimeMillis() + timeout; // read in openChannel below connectionManager.connect(); deadline = null; } // In case connect did not succeed the next getChannel() call needs to try to reconnect channel = super.getChannel(); if(channel == null) { throw ProtocolLogger.ROOT_LOGGER.channelClosed(); } return channel; }
@Override public Channel getChannel() throws IOException { Channel channel = super.getChannel(); if(channel != null) { return channel; } // Try to connect and wait for the channel synchronized (connectionManager) { deadline = System.currentTimeMillis() + timeout; // read in openChannel below connectionManager.connect(); deadline = null; } // In case connect did not succeed the next getChannel() call needs to try to reconnect channel = super.getChannel(); if(channel == null) { throw ProtocolLogger.ROOT_LOGGER.channelClosed(); } return channel; }