use of com.navercorp.pinpoint.rpc.common.SocketStateChangeResult in project pinpoint by naver.
the class DefaultPinpointClientHandler method initReconnect.
@Override
public void initReconnect() {
logger.info("{} initReconnect() started.", objectUniqName);
SocketStateChangeResult stateChangeResult = state.toBeingConnect();
if (!stateChangeResult.isChange()) {
throw new IllegalStateException("Failed to execute initReconnect() method. Error:" + stateChangeResult);
}
logger.info("{} initReconnect() completed.", objectUniqName);
}
use of com.navercorp.pinpoint.rpc.common.SocketStateChangeResult in project pinpoint by naver.
the class PinpointClientHandlerState method to.
private SocketStateChangeResult to(SocketStateCode nextState) {
String objectName = clientHandler.getObjectName();
PinpointSocket pinpointSocket = clientHandler.getPinpointClient();
logger.debug("{} stateTo() started. to:{}", objectName, nextState);
SocketStateChangeResult stateChangeResult = state.to(nextState);
if (stateChangeResult.isChange()) {
executeChangeEventHandler(pinpointSocket, nextState);
}
logger.info("{} stateTo() completed. {}", objectName, stateChangeResult);
return stateChangeResult;
}
use of com.navercorp.pinpoint.rpc.common.SocketStateChangeResult in project pinpoint by naver.
the class DefaultPinpointServer method handleClosePacket.
private void handleClosePacket(Channel channel) {
logger.info("{} handleClosePacket() started.", objectUniqName);
SocketStateChangeResult stateChangeResult = state.toBeingCloseByPeer();
if (!stateChangeResult.isChange()) {
logger.info("{} handleClosePacket() failed. Error: {}", objectUniqName, stateChangeResult);
} else {
logger.info("{} handleClosePacket() completed.", objectUniqName);
}
}
use of com.navercorp.pinpoint.rpc.common.SocketStateChangeResult in project pinpoint by naver.
the class DefaultPinpointServer method sendClosePacket.
public ChannelFuture sendClosePacket() {
logger.info("{} sendClosePacket() started.", objectUniqName);
SocketStateChangeResult stateChangeResult = state.toBeingClose();
if (stateChangeResult.isChange()) {
final ChannelFuture writeFuture = this.channel.write(ServerClosePacket.DEFAULT_SERVER_CLOSE_PACKET);
writeFuture.addListener(serverCloseWriteListener);
logger.info("{} sendClosePacket() completed.", objectUniqName);
return writeFuture;
} else {
logger.info("{} sendClosePacket() failed. Error:{}.", objectUniqName, stateChangeResult);
return null;
}
}
use of com.navercorp.pinpoint.rpc.common.SocketStateChangeResult in project pinpoint by naver.
the class DefaultPinpointServerState method to.
private SocketStateChangeResult to(SocketStateCode nextState) {
String objectUniqName = pinpointServer.getObjectUniqName();
logger.debug("{} stateTo() started. to:{}", objectUniqName, nextState);
SocketStateChangeResult stateChangeResult = state.to(nextState);
if (stateChangeResult.isChange()) {
executeChangeEventHandler(pinpointServer, nextState);
}
logger.info("{} stateTo() completed. {}", objectUniqName, stateChangeResult);
return stateChangeResult;
}
Aggregations