Class CloseStreamExceptionally
- java.lang.Object
-
- org.eclipse.ditto.services.gateway.streaming.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetConnectionCorrelationId()Returns the correlation ID of the WebSocket connection to be closed.static CloseStreamExceptionallygetInstance(org.eclipse.ditto.model.base.exceptions.DittoRuntimeException reason, CharSequence connectionCorrelationId)Returns an instance ofCloseWebSocket.org.eclipse.ditto.model.base.exceptions.DittoRuntimeExceptiongetReason()Returns the reason for closing the WebSocket.inthashCode()StringtoString()
-
-
-
Method Detail
-
getInstance
public static CloseStreamExceptionally getInstance(org.eclipse.ditto.model.base.exceptions.DittoRuntimeException reason, CharSequence connectionCorrelationId)
Returns an instance ofCloseWebSocket.- 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 isnull.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.
-
-