
com.arpnetworking.http.RequestReply Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of metrics-aggregator-daemon Show documentation
Show all versions of metrics-aggregator-daemon Show documentation
Aggregates samples published by metrics client libraries and writes to destinations.
/*
* Copyright 2016 Smartsheet
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.arpnetworking.http;
import org.apache.pekko.http.javadsl.model.HttpRequest;
import org.apache.pekko.http.javadsl.model.HttpResponse;
import java.util.concurrent.CompletableFuture;
/**
* Holds an HTTP request and a reply future.
*
* @author Brandon Arp (brandon dot arp at smartsheet dot com)
*/
public final class RequestReply {
/**
* Public constructor.
*
* @param request the request
* @param response the reply
*/
public RequestReply(final HttpRequest request, final CompletableFuture response) {
_request = request;
_response = response;
}
public HttpRequest getRequest() {
return _request;
}
public CompletableFuture getResponse() {
return _response;
}
private final HttpRequest _request;
private final CompletableFuture _response;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy