use of com.rabbitmq.client.impl.nio.SocketChannelFrameHandler in project pinpoint by naver.
the class SocketChannelFrameHandlerConstructInterceptor method after.
@Override
public void after(Object target, Object[] args, Object result, Throwable throwable) {
if (!validate(target)) {
return;
}
String localAddress = RabbitMQClientConstants.UNKNOWN;
String remoteAddress = RabbitMQClientConstants.UNKNOWN;
if (target instanceof SocketChannelFrameHandler) {
SocketChannelFrameHandler frameHandler = (SocketChannelFrameHandler) target;
localAddress = HostAndPort.toHostAndPortString(frameHandler.getLocalAddress().getHostAddress(), frameHandler.getLocalPort());
remoteAddress = HostAndPort.toHostAndPortString(frameHandler.getAddress().getHostAddress(), frameHandler.getPort());
}
((LocalAddressAccessor) target)._$PINPOINT$_setLocalAddress(localAddress);
((RemoteAddressAccessor) target)._$PINPOINT$_setRemoteAddress(remoteAddress);
}
Aggregations