Sends a command request to the given node.

@param request the request to send
@return a future to be completed with the response
331513
public CompletableFuture<CommandResponse> command(CommandRequest request) {
    CompletableFuture<CommandResponse> future = new CompletableFuture<>();
    if (context.isCurrentContext()) {
      sendRequest(request, protocol::command, future);
    } else {
      context.execute(() -> sendRequest(request, protocol::command, future));
    }
    return future;
  }
479795
public Nfs3MknodResponse wrapped_sendMknod(NfsMknodRequest request) throws IOException {
        RpcResponseHandler<Nfs3MknodResponse> responseHandler = new NfsResponseHandler<Nfs3MknodResponse>() {
            
            /* (non-Javadoc)
             * @see com.emc.ecs.nfsclient.rpc.RpcResponseHandler#makeNewResponse()
             */
            protected Nfs3MknodResponse makeNewResponse() {
                return new Nfs3MknodResponse();
            }

        };
        _rpcWrapper.callRpcWrapped(request, responseHandler);
        return responseHandler.getResponse();
    }
1286753
@Override
	public void handleRequest(final Request request) {
		if (plainBtn.isPressed()) {
			WMessages.getInstance(this).info("Plain button pressed.");
		}

		if (linkBtn.isPressed()) {
			WMessages.getInstance(this).info("Link button pressed.");
		}
	}
926073
public CompletableFuture<BackupResponse> backup(BackupRequest request) {
    logRequest(request);
    return CompletableFuture.completedFuture(logResponse(BackupResponse.error()));
  }
445281
protected Future<OAuth2AccessToken> sendAccessTokenRequestAsync(OAuthRequest request,
            OAuthAsyncRequestCallback<OAuth2AccessToken> callback) {

        return execute(request, callback, new OAuthRequest.ResponseConverter<OAuth2AccessToken>() {
            @Override
            public OAuth2AccessToken convert(Response response) throws IOException {
                return getApi().getAccessTokenExtractor().extract(response);
            }
        });
    }
543769
void dispatchRequest(final HttpRequest request) {
		networkQueue.dispatchAsync(new DispatchTask() {
			@Override
			protected void execute() {
				request.dispatchSync(networkQueue);
			}
		});
	}
356609
public Future<SendMessageResult> sendMessage(SendMessageRequest request,
                                                 AsyncHandler<SendMessageRequest, SendMessageResult> handler) {
        QueueBufferCallback<SendMessageRequest, SendMessageResult> callback = null;
        if (handler != null) {
            callback = new QueueBufferCallback<SendMessageRequest, SendMessageResult>(handler, request);
        }
        QueueBufferFuture<SendMessageRequest, SendMessageResult> future = sendBuffer.sendMessage(request, callback);
        future.setBuffer(this);
        return future;
    }
977963
private <T extends Request, U> void sendRequest(T request, BiFunction<Request, Connection, CompletableFuture<U>> sender, CompletableFuture<U> future) {
    if (open) {
      connect().whenComplete((c, e) -> sendRequest(request, sender, c, e, future));
    }
  }
1242243
private CompletableFuture<HeartbeatResponse> handleHeartbeat(HeartbeatRequest request) {
    log.trace("Received {}", request);
    boolean newLeader = !Objects.equals(selectorManager.leader(), request.leader());
    selectorManager.resetAll(request.leader(), request.members());
    HeartbeatResponse response = HeartbeatResponse.builder()
        .withStatus(RaftResponse.Status.OK)
        .build();
    if (newLeader) {
      resetAllIndexes();
    }
    log.trace("Sending {}", response);
    return CompletableFuture.completedFuture(response);
  }
993566
public Completes<Response> requestWith(final Request request) {
    final Completes<Response> completes =
            configuration.keepAlive ?
                    Completes.repeatableUsing(configuration.stage.scheduler()) :
                    Completes.using(configuration.stage.scheduler());
    consumer.requestWith(request, completes);
    return completes;
  }
299779
public CompletableFuture<RestoreResponse> restore(RestoreRequest request) {
    logRequest(request);
    return CompletableFuture.completedFuture(logResponse(RestoreResponse.error()));
  }
1066341
public Task<Void> execute(@Nonnull final AwsRequest request) {
    return dispatcher.dispatchTask(new Callable<Void>() {
      @Override
      public Void call() {
        proxy.execute(request);
        return null;
      }
    });
  }
1302904
private CompletableFuture<CloseResponse> close(CloseRequest request) {
    return getService(request).thenCompose(service -> service.close(request));
  }
172810
@Override
	public void handleRequest(final Request request) {
		String clientState = request.getParameter(getId());

		if (clientState != null) {
			setCollapsed(clientState.equalsIgnoreCase("closed"));
		}
	}
348798
public CompletableFuture<KeepAliveResponse> keepAlive(KeepAliveRequest request) {
    CompletableFuture<KeepAliveResponse> future = new CompletableFuture<>();
    if (context.isCurrentContext()) {
      sendRequest(request, protocol::keepAlive, future);
    } else {
      context.execute(() -> sendRequest(request, protocol::keepAlive, future));
    }
    return future;
  }
1139174
public CompletableFuture<AppendResponse> append(AppendRequest request) {
    logRequest(request);
    return CompletableFuture.completedFuture(logResponse(AppendResponse.error()));
  }
486805
public CompletableFuture<ExecuteResponse> execute(ExecuteRequest request) {
    logRequest(request);
    return CompletableFuture.completedFuture(logResponse(ExecuteResponse.error()));
  }