作者:平淡人生路20111212 | 来源:互联网 | 2023-10-11 13:24
本文整理了Java中org.web3j.protocol.core.Request.setId
方法的一些代码示例,展示了Request.setId
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.setId
方法的具体详情如下:
包路径:org.web3j.protocol.core.Request
类名称:Request
方法名:setId
Request.setId介绍
暂无
代码示例
代码示例来源:origin: web3j/web3j
@Before
public void before() throws InterruptedException {
when(webSocketClient.connectBlocking()).thenReturn(true);
request.setId(1);
}
代码示例来源:origin: web3j/web3j
private Flowable subscribeToEvents() {
subscribeRequest = new Request<>(
"eth_subscribe",
Arrays.asList("newHeads", Collections.emptyMap()),
service,
EthSubscribe.class);
subscribeRequest.setId(1);
return service.subscribe(
subscribeRequest,
"eth_unsubscribe",
NewHeadsNotification.class
);
}
代码示例来源:origin: org.apache.camel/camel-web3j
private void setRequestId(Message message, Request request) {
final Long id = message.getHeader(Web3jConstants.ID, Long.class);
LOG.debug("setRequestId {}", id);
if (id != null) {
request.setId(id);
}
}