org.fisco.bcos.web3j.protocol.websocket.WebSocketSubscription Maven / Gradle / Ivy
package org.fisco.bcos.web3j.protocol.websocket;
import io.reactivex.subjects.BehaviorSubject;
/**
* Objects necessary to process a new item received via a WebSocket subscription.
*
* @param type of a data item that should be returned by a WebSocket subscription.
*/
public class WebSocketSubscription {
private BehaviorSubject subject;
private Class responseType;
/**
* Creates WebSocketSubscription.
*
* @param subject used to send new data items to listeners
* @param responseType type of a data item returned by a WebSocket subscription
*/
public WebSocketSubscription(BehaviorSubject subject, Class responseType) {
this.subject = subject;
this.responseType = responseType;
}
public BehaviorSubject getSubject() {
return subject;
}
public Class getResponseType() {
return responseType;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy