estonlabs.cxtl.common.stream.managed.OutboundMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cxtl Show documentation
Show all versions of cxtl Show documentation
CXTL – Crypto eXchange Trading Library
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();
}