Class EventStreamError
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
software.amazon.awssdk.eventstreamrpc.model.EventStreamError
- All Implemented Interfaces:
Serializable
Used to hold event stream RPC error messages that are not tied to any service.
Message info comes back with a payload of JSON like:
{ "message": "..." }
And we map that to this exception type to convey the information
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEventStreamError(String message) Creates a new EventStream error with only a messageEventStreamError(String message, List<software.amazon.awssdk.crt.eventstream.Header> headers, software.amazon.awssdk.crt.eventstream.MessageType messageType) Creates a new EventStreamError with a message, headers, and message type -
Method Summary
Modifier and TypeMethodDescriptionstatic EventStreamErrorcreate(List<software.amazon.awssdk.crt.eventstream.Header> headers, byte[] payload, software.amazon.awssdk.crt.eventstream.MessageType messageType) Creates a new EventStreamErrorList<software.amazon.awssdk.crt.eventstream.Header>Returns the headers associated with the EventStreamErrorsoftware.amazon.awssdk.crt.eventstream.MessageTypeReturns the message type associated with the EventStreamErrorMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
EventStreamError
Creates a new EventStream error with only a message- Parameters:
message- The message to associate with the EventStreamError
-
EventStreamError
public EventStreamError(String message, List<software.amazon.awssdk.crt.eventstream.Header> headers, software.amazon.awssdk.crt.eventstream.MessageType messageType) Creates a new EventStreamError with a message, headers, and message type- Parameters:
message- The message to associate with the EventStreamErrorheaders- Headers to associate with the EventStreamErrormessageType- The message type to associate with the EventStreamError
-
-
Method Details
-
create
public static EventStreamError create(List<software.amazon.awssdk.crt.eventstream.Header> headers, byte[] payload, software.amazon.awssdk.crt.eventstream.MessageType messageType) Creates a new EventStreamError- Parameters:
headers- currently unusued, but likely a useful element for outputpayload- The payload to associated with the EventStreamErrormessageType- The message type to associate with the EventStreamError- Returns:
- A new EventStreamError
-
getMessageHeaders
Returns the headers associated with the EventStreamError- Returns:
- the headers associated with the EventStreamError
-
getMessageType
public software.amazon.awssdk.crt.eventstream.MessageType getMessageType()Returns the message type associated with the EventStreamError- Returns:
- the message type associated with the EventStreamError
-