sender.sendRequest(connection, action, request, options, restoringHandler);
sender.sendRequest(connection, action, request, options, restoringHandler);
@Override public <T extends TransportResponse> void sendRequest(Transport.Connection connection, String action, TransportRequest request, TransportRequestOptions options, final TransportResponseHandler<T> handler) { assertVersionSerializable(request); sender.sendRequest(connection, action, request, options, new TransportResponseHandler<T>() { @Override public T read(StreamInput in) throws IOException { return handler.read(in); } @Override public void handleResponse(T response) { assertVersionSerializable(response); handler.handleResponse(response); } @Override public void handleException(TransportException exp) { handler.handleException(exp); } @Override public String executor() { return handler.executor(); } }); } };
public final <T extends TransportResponse> void sendRequest(final Transport.Connection connection, final String action, final TransportRequest request, final TransportRequestOptions options, TransportResponseHandler<T> handler) { try { asyncSender.sendRequest(connection, action, request, options, handler); } catch (NodeNotConnectedException ex) { // the caller might not handle this so we invoke the handler handler.handleException(ex); } }
@Override public <T extends TransportResponse> void sendRequest(Transport.Connection connection, String action, TransportRequest request, TransportRequestOptions options, TransportResponseHandler<T> handler) { if (bucklerConfig.getAuthConfig().isEnabledForTcp()) { String authorization = bucklerConfig.getAuthConfig().getAuthorization(); if (threadContext.getHeader("Authorization") == null) { threadContext.putHeader("Authorization", authorization); } } sender.sendRequest(connection, action, request, options, handler); } }
public final <T extends TransportResponse> void sendRequest(final Transport.Connection connection, final String action, final TransportRequest request, final TransportRequestOptions options, TransportResponseHandler<T> handler) { asyncSender.sendRequest(connection, action, request, options, handler); }
public final <T extends TransportResponse> void sendRequest(final Transport.Connection connection, final String action, final TransportRequest request, final TransportRequestOptions options, TransportResponseHandler<T> handler) { try { asyncSender.sendRequest(connection, action, request, options, handler); } catch (NodeNotConnectedException ex) { // the caller might not handle this so we invoke the handler handler.handleException(ex); } }