List of usage examples for com.rabbitmq.client.impl.nio SocketChannelFrameHandler getAddress
@Override
public InetAddress getAddress()
From source file:com.navercorp.pinpoint.plugin.rabbitmq.client.interceptor.SocketChannelFrameHandlerConstructInterceptor.java
License:Apache License
@Override public void after(Object target, Object[] args, Object result, Throwable throwable) { if (!validate(target)) { return;/*from w ww . j a va2 s . c o m*/ } 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); }