All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.smallrye.graphql.client.websocket.WebsocketSubprotocol Maven / Gradle / Ivy

Go to download

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