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

com.ziqni.admin.sdk.streaming.stomp.StompCommand Maven / Gradle / Ivy

There is a newer version: 1.0.24
Show newest version
/*
 * Copyright (c) 2024. ZIQNI LTD registered in England and Wales, company registration number-09693684
 */

package com.ziqni.admin.sdk.streaming.stomp;

public enum StompCommand {

    CONNECT,
    CONNECTED,
    SEND,
    SUBSCRIBE,
    UNSUBSCRIBE,
    ACK,
    NACK,
    BEGIN,
    COMMIT,
    ABORT,
    DISCONNECT,
    MESSAGE,
    RECEIPT,
    ERROR,
    NOT_A_VALID_STOMP_COMMAND; // This is a special command used to indicate that the command is not a valid STOMP command

    public static StompCommand fromString(String command) {
        try {
            return StompCommand.valueOf(command.trim().toUpperCase());
        } catch (IllegalArgumentException e) {
            throw new IllegalArgumentException("Unknown STOMP command: " + command);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy