/** {@inheritDoc} */ @Override public Channel getChannel() throws IOException { return strategy.getChannel(); }
/** {@inheritDoc} */ @Override public Channel getChannel() throws IOException { return strategy.getChannel(); }
/** {@inheritDoc} */ @Override public Channel getChannel() throws IOException { return strategy.getChannel(); }
/** {@inheritDoc} */ @Override public <T, A> AsyncFuture<T> executeRequest(final ActiveOperation<T, A> support, final ManagementRequest<T, A> request) throws IOException { return super.executeRequest(request, strategy.getChannel(), support); }
/** {@inheritDoc} */ @Override public <T, A> AsyncFuture<T> executeRequest(final ActiveOperation<T, A> support, final ManagementRequest<T, A> request) throws IOException { return super.executeRequest(request, strategy.getChannel(), support); }
/** {@inheritDoc} */ @Override public <T, A> AsyncFuture<T> executeRequest(final ActiveOperation<T, A> support, final ManagementRequest<T, A> request) throws IOException { return super.executeRequest(request, strategy.getChannel(), support); }
/** * Get the remote address. * * @return the remote address, {@code null} if not available */ public InetAddress getRemoteAddress() { final Channel channel; try { channel = strategy.getChannel(); } catch (IOException e) { return null; } final Connection connection = channel.getConnection(); final InetSocketAddress peerAddress = connection.getPeerAddress(InetSocketAddress.class); return peerAddress == null ? null : peerAddress.getAddress(); }
/** * Get the remote address. * * @return the remote address, {@code null} if not available */ public InetAddress getRemoteAddress() { final Channel channel; try { channel = strategy.getChannel(); } catch (IOException e) { return null; } final Connection connection = channel.getConnection(); final InetSocketAddress peerAddress = connection.getPeerAddress(InetSocketAddress.class); return peerAddress == null ? null : peerAddress.getAddress(); }
ch = localStrategy.getChannel(); synchronized(lock) { strategy = localStrategy;
ch = localStrategy.getChannel(); synchronized(lock) { strategy = localStrategy;
protected Channel getOrCreateChannel() throws IOException { synchronized (closeable) { if (closeable.closed) { throw ControllerClientLogger.ROOT_LOGGER.objectIsClosed(ModelControllerClient.class.getSimpleName()); } if (closeable.strategy == null) { try { closeable.endpoint = Endpoint.builder().setEndpointName("management-client").build(); final ProtocolConnectionConfiguration configuration = ProtocolConfigurationFactory.create(closeable.clientConfiguration, closeable.endpoint); closeable.strategy = ManagementClientChannelStrategy.create(configuration, closeable.channelAssociation, closeable.clientConfiguration.getCallbackHandler(), closeable.clientConfiguration.getSaslOptions(), closeable.clientConfiguration.getSSLContext(), new CloseHandler<Channel>() { @Override public void handleClose(final Channel closed, final IOException exception) { closeable.channelAssociation.handleChannelClosed(closed, exception); } }); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } } return closeable.strategy.getChannel(); } }
return strategy.getChannel();