use of org.fisco.bcos.channel.dto.ChannelResponse in project web3sdk by FISCO-BCOS.
the class PushCallback2 method onPush.
@Override
public void onPush(ChannelPush push) {
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
logger.debug("push:" + push.getContent());
System.out.println(df.format(LocalDateTime.now()) + "server:push:" + push.getContent());
ChannelResponse response = new ChannelResponse();
response.setContent("receive request seq:" + String.valueOf(push.getMessageID()));
response.setErrorCode(0);
push.sendResponse(response);
}
Aggregations