com.upstox.feeder.Feeder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of upstox-java-sdk Show documentation
Show all versions of upstox-java-sdk Show documentation
The official Java client for communicating with the Upstox API
package com.upstox.feeder;
import org.java_websocket.client.WebSocketClient;
import com.upstox.ApiClient;
import com.upstox.feeder.listener.OnCloseListener;
import com.upstox.feeder.listener.OnErrorListener;
import com.upstox.feeder.listener.OnMessageListener;
import com.upstox.feeder.listener.OnOpenListener;
public abstract class Feeder {
protected ApiClient apiClient;
protected WebSocketClient webSocket;
protected OnOpenListener onOpenListener;
protected OnMessageListener onMessageListener;
protected OnErrorListener onErrorListener;
protected OnCloseListener onCloseListener;
protected Feeder(ApiClient apiClient) {
this.apiClient = apiClient;
}
protected ApiClient getApiClient() {
return apiClient;
}
protected void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
protected abstract void connect();
protected void disconnect() {
this.webSocket.close(1000);
}
}