cc.youchain.protocol.websocket.WebSocketRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
YOUChain Common library in JAVA.
package cc.youchain.protocol.websocket;
import java.util.concurrent.CompletableFuture;
/**
* Objects necessary to process a reply for a request sent via WebSocket protocol.
*
* @param type of a data item that should be returned by the sent request
*/
class WebSocketRequest {
private CompletableFuture onReply;
private Class responseType;
public WebSocketRequest(CompletableFuture onReply, Class responseType) {
this.onReply = onReply;
this.responseType = responseType;
}
public CompletableFuture getOnReply() {
return onReply;
}
public Class getResponseType() {
return responseType;
}
}