Class CloseStreamExceptionally

  • All Implemented Interfaces:
    StreamControlMessage

    public final class CloseStreamExceptionally
    extends Object
    implements StreamControlMessage
    Command for triggering the closing of a streaming connection (e. g. WebSocket) because of an exception.
    • Method Detail

      • getInstance

        public static CloseStreamExceptionally getInstance​(org.eclipse.ditto.model.base.exceptions.DittoRuntimeException reason,
                                                           CharSequence connectionCorrelationId)
        Returns an instance of CloseWebSocket.
        Parameters:
        reason - the reason for closing the WebSocket.
        connectionCorrelationId - the correlation ID of the WebSocket connection to be closed.
        Returns:
        the instance.
        Throws:
        NullPointerException - if any argument is null.
        IllegalArgumentException - if any argument is empty.
      • getReason

        public org.eclipse.ditto.model.base.exceptions.DittoRuntimeException getReason()
        Returns the reason for closing the WebSocket.
        Returns:
        the reason.
      • getConnectionCorrelationId

        public String getConnectionCorrelationId()
        Returns the correlation ID of the WebSocket connection to be closed.
        Returns:
        the correlation ID.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object