本文整理了Java中org.web3j.protocol.core.Request.setId
方法的一些代码示例,展示了Request.setId
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.setId
方法的具体详情如下:
包路径:org.web3j.protocol.core.Request
类名称:Request
方法名:setId
暂无
代码示例来源:origin: web3j/web3j
@Before
public void before() throws InterruptedException {
when(webSocketClient.connectBlocking()).thenReturn(true);
request.setId(1);
}
代码示例来源:origin: web3j/web3j
private Flowable<NewHeadsNotification> 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);
}
}
内容来源于网络,如有侵权,请联系作者删除!