All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opensearch.client.Message Maven / Gradle / Ivy

There is a newer version: 2.18.0
Show newest version
/*
 * SPDX-License-Identifier: Apache-2.0
 *
 * The OpenSearch Contributors require contributions made to
 * this file be licensed under the Apache-2.0 license or a
 * compatible open source license.
 */

package org.opensearch.client;

import org.apache.http.HttpMessage;

import java.util.Objects;

final class Message {
    private final H head;
    private final B body;

    public Message(final H head, final B body) {
        this.head = Objects.requireNonNull(head, "Message head");
        this.body = body;
    }

    public H getHead() {
        return head;
    }

    public B getBody() {
        return body;
    }

    @Override
    public String toString() {
        return "[" + "head=" + head + ", body=" + body + ']';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy