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

software.amazon.awssdk.eventstreamrpc.StreamResponse Maven / Gradle / Ivy

There is a newer version: 1.23.0
Show newest version
/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */

package software.amazon.awssdk.eventstreamrpc;

import software.amazon.awssdk.eventstreamrpc.model.EventStreamJsonMessage;

import java.util.concurrent.CompletableFuture;

/**
 * Interface for stream responses
 */
public interface StreamResponse
                        extends StreamEventPublisher {
    /**
     * Completable future indicating flush of the request that initiated the stream operation
     *
     * @return Completable future indicating flush of the request that initiated the stream operation
     */
    CompletableFuture getRequestFlushFuture();

    /**
     * Completable future for retrieving the initial-response of the stream operation
     *
     * @return Completable future for retrieving the initial-response of the stream operation
     */
    CompletableFuture getResponse();

    /**
     * Tests if the stream is closed
     * @return True if the stream is closed
     */
    boolean isClosed();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy