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

estonlabs.cxtl.common.stream.managed.OutboundMessage Maven / Gradle / Ivy

There is a newer version: 1.4.14
Show newest version
package estonlabs.cxtl.common.stream.managed;

import lombok.Getter;

/**
 * A structured outbound message that conforms to a MessageType
 */
public interface OutboundMessage {

    @Getter
    enum MessageType {
        /**
         * A logon message to authenticate for private data
         */
        LOGON(true),
        /**
         * A subscription message
         */
        SUBSCRIPTION(true),
        /**
         * A unsubscribe message
         */
        UNSUBSCRIBE(true),
        /**
         * A pong message
         */
        PONG(false),
        /**
         * A ping message
         */
        PING(false),

        /**
         * A snapshot request message
         */
        SNAPSHOT(false);

        /**
         * If the message is recoverable then the ManagedWsSession will replay the message on a reconnection
         */
        private final boolean recoverable;

        MessageType(boolean recoverable) {
            this.recoverable = recoverable;
        }
    }


    /**
     * @return - the type of message
     */
    MessageType getMessageType();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy