software.amazon.awssdk.eventstreamrpc.StreamEventPublisher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-iot-device-sdk Show documentation
Show all versions of aws-iot-device-sdk Show documentation
Java bindings for the AWS IoT Core Service
/**
* 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 to enable sending events over an open stream operation.
*
* @param Data to push over the open stream
*/
public interface StreamEventPublisher {
/**
* Publish an event over an open stream operation.
*
* @param streamEvent event to publish
* @return Completable future indicating flush of the event over the stream
*/
public CompletableFuture sendStreamEvent(final StreamEventType streamEvent);
/**
* Closes the stream by sending an empty message
*
* @return Completable future indicating flush of the stream termination message
*/
public CompletableFuture closeStream();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy