Enum Class GraphQlWebSocketMessageType
java.lang.Object
java.lang.Enum<GraphQlWebSocketMessageType>
org.springframework.graphql.server.support.GraphQlWebSocketMessageType
- All Implemented Interfaces:
Serializable
,Comparable<GraphQlWebSocketMessageType>
,Constable
Enum for a message type as defined in the GraphQL over WebSocket spec proposal.
- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates that the requested operation execution has completed.Expected response to theCONNECTION_INIT
message from the client acknowledging a successful connection with the server.Indicates that the client wants to establish a connection within the existing socket.Operation execution error(s) in response to theSUBSCRIBE
message.Operation execution result(s) from the source stream created by the bindingSUBSCRIBE
message.Indicates the GraphQL message did not have a message type.Useful for detecting failed connections, displaying latency metrics or other types of network probing.The response to thePING
message.Requests an operation specified in the message payload. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return if the message type has a payload, and it is required.static GraphQlWebSocketMessageType
toString()
value()
The protocol value for the message type.static GraphQlWebSocketMessageType
Returns the enum constant of this class with the specified name.static GraphQlWebSocketMessageType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CONNECTION_INIT
Indicates that the client wants to establish a connection within the existing socket. -
CONNECTION_ACK
Expected response to theCONNECTION_INIT
message from the client acknowledging a successful connection with the server. -
PING
Useful for detecting failed connections, displaying latency metrics or other types of network probing. -
PONG
-
SUBSCRIBE
Requests an operation specified in the message payload. -
NEXT
Operation execution result(s) from the source stream created by the bindingSUBSCRIBE
message. -
ERROR
Operation execution error(s) in response to theSUBSCRIBE
message. -
COMPLETE
Indicates that the requested operation execution has completed. -
NOT_SPECIFIED
Indicates the GraphQL message did not have a message type.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
value
The protocol value for the message type. -
doesNotRequirePayload
public boolean doesNotRequirePayload()Return if the message type has a payload, and it is required. -
fromValue
-
toString
- Overrides:
toString
in classEnum<GraphQlWebSocketMessageType>
-