cn.hyperchain.sdk.service.impl.RadarServiceImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of litesdk Show documentation
Show all versions of litesdk Show documentation
A Java client tool for Hyperchain
package cn.hyperchain.sdk.service.impl;
import cn.hyperchain.sdk.provider.ProviderManager;
import cn.hyperchain.sdk.request.RadarRequest;
import cn.hyperchain.sdk.request.Request;
import cn.hyperchain.sdk.response.radar.RadarResponse;
import cn.hyperchain.sdk.service.RadarService;
import java.util.HashMap;
import java.util.Map;
public class RadarServiceImpl implements RadarService {
private ProviderManager providerManager;
private static final String RADAR_PRE = "radar_";
public RadarServiceImpl(ProviderManager providerManager) {
this.providerManager = providerManager;
}
@Override
public Request listenContract(String sourceCode, String contractAddress, int... nodeIds) {
RadarRequest radarResponseRequest = new RadarRequest(RADAR_PRE + "registerContract", providerManager, RadarResponse.class, nodeIds);
Map metas = new HashMap<>();
metas.put("source", sourceCode);
metas.put("address", contractAddress);
radarResponseRequest.addParams(metas);
return radarResponseRequest;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy