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

io.contek.invoker.okx.api.websocket.user.OrdersChannel Maven / Gradle / Ivy

There is a newer version: 3.8.0
Show newest version
package io.contek.invoker.okx.api.websocket.user;

import io.contek.invoker.okx.api.common._Order;
import io.contek.invoker.okx.api.websocket.common.WebSocketChannelPushData;

import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import javax.annotation.concurrent.NotThreadSafe;
import javax.annotation.concurrent.ThreadSafe;

import static io.contek.invoker.okx.api.websocket.common.constants.WebSocketChannelKeys._orders;

@ThreadSafe
public final class OrdersChannel extends WebSocketUserChannel {

  OrdersChannel(OrdersChannel.Id id) {
    super(id);
  }

  @Override
  public Class getMessageType() {
    return Message.class;
  }

  @Immutable
  public static final class Id extends WebSocketUserChannelId {

    private Id(String type, @Nullable String instId) {
      super(_orders, type, instId);
    }

    public static Id of(String type, @Nullable String instId) {
      return new Id(type, instId);
    }
  }

  @NotThreadSafe
  public static final class Message extends WebSocketChannelPushData<_Order> {}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy