use of com.navercorp.pinpoint.rpc.packet.PingPayloadPacket in project pinpoint by naver.
the class DefaultPinpointClientHandler method sendPing.
public void sendPing() {
if (!state.isEnableCommunication()) {
return;
}
logger.debug("{} sendPing() started.", objectUniqName);
PingPayloadPacket pingPacket = new PingPayloadPacket(pingIdGenerator.incrementAndGet(), (byte) 0, state.getCurrentStateCode().getId());
ChannelFuture future = write0(pingPacket);
future.awaitUninterruptibly();
if (!future.isSuccess()) {
Throwable cause = future.getCause();
throw new PinpointSocketException("send ping failed. Error:" + cause.getMessage(), cause);
}
logger.debug("{} sendPing() completed.", objectUniqName);
}
Aggregations