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

estonlabs.cxtl.exchanges.mexc.spot.v3.MEXCOutboundMessage Maven / Gradle / Ivy

There is a newer version: 1.4.14
Show newest version
package estonlabs.cxtl.exchanges.mexc.spot.v3;

import com.fasterxml.jackson.annotation.JsonInclude;
import estonlabs.cxtl.common.stream.managed.OutboundMessage;
import estonlabs.cxtl.exchanges.mexc.spot.v3.domain.enums.WSMethod;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

@Data
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class MEXCOutboundMessage implements OutboundMessage {

    private WSMethod method;
    private List params;

    @Override
    public MessageType getMessageType() {
        return switch (method){
            case PING -> MessageType.PING;
            case SUBSCRIPTION -> MessageType.SUBSCRIPTION;
            case UNSUBSCRIPTION -> MessageType.UNSUBSCRIBE;
        };
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy