io.smallrye.graphql.client.websocket.WebsocketSubprotocol Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smallrye-graphql-client-api Show documentation
Show all versions of smallrye-graphql-client-api Show documentation
SmallRye specific Client API, extending the MicroProfile client api, allowing us to play with the api first before we move it to the spec
The newest version!
package io.smallrye.graphql.client.websocket;
public enum WebsocketSubprotocol {
GRAPHQL_WS("graphql-ws"),
GRAPHQL_TRANSPORT_WS("graphql-transport-ws");
private static final WebsocketSubprotocol[] VALUES = values();
private final String protocolId;
WebsocketSubprotocol(String protocolId) {
this.protocolId = protocolId;
}
public String getProtocolId() {
return protocolId;
}
public static WebsocketSubprotocol fromString(String text) {
for (WebsocketSubprotocol b : VALUES) {
if (b.protocolId.equalsIgnoreCase(text)) {
return b;
}
}
throw new IllegalArgumentException("Unknown websocket subprotocol: " + text);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy