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

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

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

/* This file is part of greengrass-ipc project. */

package software.amazon.awssdk.eventstreamrpc;

/**
 * Thrown when a EventStream closed exception occurs
 */
public class EventStreamClosedException extends RuntimeException {
    /**
     * Creates a new EventStreamClosedException from the given continuation ID
     * @param continauationId The continuation ID that caused the exception
     */
    public EventStreamClosedException(long continauationId) {
        //TODO: Is hex formatting here useful? It is short, but not consistent anywhere else yet
        super(String.format("EventStream continuation [%s] is already closed!", Long.toHexString(continauationId)));
    }

    /**
     * Creates a new EventStreamClosedException with a given messasge
     * @param msg The message to associated with the EventStreamClosedException
     */
    public EventStreamClosedException(String msg) {
        //TODO: Is hex formatting here useful? It is short, but not consistent anywhere else yet
        super(msg);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy