public static String parseChannelRemoteAddr(final Channel channel) { if (null == channel) { return ""; } final SocketAddress remote = channel.remoteAddress(); final String addr = remote != null ? remote.toString() : ""; if (addr.length() > 0) { int index = addr.lastIndexOf("/"); if (index >= 0) { return addr.substring(index + 1); } return addr; } return ""; }
public static String parseChannelRemoteAddr(final Channel channel) { if (null == channel) { return ""; } final SocketAddress remote = channel.remoteAddress(); final String addr = remote != null ? remote.toString() : ""; if (addr.length() > 0) { int index = addr.lastIndexOf("/"); if (index >= 0) { return addr.substring(index + 1); } return addr; } return ""; }
@Override public void operationComplete(Future future) throws Exception { once.release(); if (!future.isSuccess()) { LOGGER.warn("send a request command to channel <" + channel.remoteAddress() + "> failed."); LOGGER.warn(request.toString()); } } });
@Override public void operationComplete(Future future) throws Exception { once.release(); if (!future.isSuccess()) { LOGGER.warn("send a request command to channel <" + channel.remoteAddress() + "> failed."); LOGGER.warn(request.toString()); } } });
@Override public void operationComplete(Future future) throws Exception { if (future.isSuccess()) { responseFuture.setSendRequestOK(true); return; } else { responseFuture.setSendRequestOK(false); } responseTable.remove(request.getOpaque()); responseFuture.setCause(future.cause()); responseFuture.putResponse(null); LOGGER.warn("send a request command to channel <" + channel.remoteAddress() + "> failed."); LOGGER.warn(request.toString()); } });
@Override public void operationComplete(Future future) throws Exception { if (future.isSuccess()) { responseFuture.setSendRequestOK(true); return; } else { responseFuture.setSendRequestOK(false); } responseTable.remove(request.getOpaque()); responseFuture.setCause(future.cause()); responseFuture.putResponse(null); LOGGER.warn("send a request command to channel <" + channel.remoteAddress() + "> failed."); LOGGER.warn(request.toString()); } });
@Override public void operationComplete(Future future) throws Exception { if (future.isSuccess()) { responseFuture.setSendRequestOK(true); return; } else { responseFuture.setSendRequestOK(false); } responseFuture.putResponse(null); try { responseFuture.executeInvokeCallback(); } finally { responseFuture.release(); } responseTable.remove(request.getOpaque()); LOGGER.warn("send a request command to channel <" + channel.remoteAddress() + "> failed."); LOGGER.warn(request.toString()); } });
@Override public void operationComplete(Future future) throws Exception { if (future.isSuccess()) { responseFuture.setSendRequestOK(true); return; } else { responseFuture.setSendRequestOK(false); } responseFuture.putResponse(null); try { responseFuture.executeInvokeCallback(); } finally { responseFuture.release(); } responseTable.remove(request.getOpaque()); LOGGER.warn("send a request command to channel <" + channel.remoteAddress() + "> failed."); LOGGER.warn(request.toString()); } });
} catch (Exception e) { once.release(); LOGGER.warn("write send a request command to channel <" + channel.remoteAddress() + "> failed."); throw new RemotingSendRequestException(RemotingHelper.parseChannelRemoteAddr(channel), e);
} catch (Exception e) { once.release(); LOGGER.warn("write send a request command to channel <" + channel.remoteAddress() + "> failed."); throw new RemotingSendRequestException(RemotingHelper.parseChannelRemoteAddr(channel), e);
} catch (Exception e) { once.release(); LOGGER.warn("write send a request command to channel <" + channel.remoteAddress() + "> failed."); throw new RemotingSendRequestException(RemotingHelper.parseChannelRemoteAddr(channel), e);
} catch (Exception e) { once.release(); LOGGER.warn("write send a request command to channel <" + channel.remoteAddress() + "> failed."); throw new RemotingSendRequestException(RemotingHelper.parseChannelRemoteAddr(channel), e);
public static String parseChannelRemoteAddr(final Channel channel) { if (null == channel) { return ""; } final SocketAddress remote = channel.remoteAddress(); final String addr = remote != null ? remote.toString() : ""; if (addr.length() > 0) { int index = addr.lastIndexOf("/"); if (index >= 0) { return addr.substring(index + 1); } return addr; } return ""; }
@Override public void operationComplete(Future future) throws Exception { once.release(); if (!future.isSuccess()) { LOGGER.warn("send a request command to channel <" + channel.remoteAddress() + "> failed."); LOGGER.warn(request.toString()); } } });
@Override public void operationComplete(Future future) throws Exception { if (future.isSuccess()) { responseFuture.setSendRequestOK(true); return; } else { responseFuture.setSendRequestOK(false); } responseFuture.putResponse(null); responseFuture.executeInvokeCallback(); responseTable.remove(request.getOpaque()); LOGGER.warn("send a request command to channel <" + channel.remoteAddress() + "> failed."); LOGGER.warn(request.toString()); } });
@Override public void operationComplete(Future future) throws Exception { if (future.isSuccess()) { responseFuture.setSendRequestOK(true); return; } else { responseFuture.setSendRequestOK(false); } responseTable.remove(request.getOpaque()); responseFuture.setCause(future.cause()); responseFuture.putResponse(null); LOGGER.warn("send a request command to channel <" + channel.remoteAddress() + "> failed."); LOGGER.warn(request.toString()); } });
} catch (Exception e) { once.release(); LOGGER.warn("write send a request command to channel <" + channel.remoteAddress() + "> failed."); throw new RemotingSendRequestException(RemotingHelper.parseChannelRemoteAddr(channel), e);
} catch (Exception e) { once.release(); LOGGER.warn("write send a request command to channel <" + channel.remoteAddress() + "> failed."); throw new RemotingSendRequestException(RemotingHelper.parseChannelRemoteAddr(channel), e);