use of com.baidu.hugegraph.computer.core.network.ConnectionId in project hugegraph-computer by hugegraph.
the class AbstractNettyHandler method processFailMessage.
protected void processFailMessage(ChannelHandlerContext ctx, Channel channel, FailMessage failMessage) {
int errorCode = failMessage.errorCode();
TransportException exception = new TransportException(errorCode, "Remote error from '%s', cause: %s", TransportUtil.remoteAddress(channel), failMessage.message());
ConnectionId connectionId = TransportUtil.remoteConnectionId(channel);
this.transportHandler().exceptionCaught(exception, connectionId);
}
use of com.baidu.hugegraph.computer.core.network.ConnectionId in project hugegraph-computer by hugegraph.
the class ChannelFutureListenerOnWrite method onFailure.
public void onFailure(Channel channel, Throwable cause) {
TransportException exception;
if (cause instanceof TransportException) {
exception = (TransportException) cause;
} else {
exception = new TransportException("Failed to send data to '%s': %s", cause, TransportUtil.remoteAddress(channel), cause.getMessage());
}
ConnectionId connectionId = TransportUtil.remoteConnectionId(channel);
this.handler.exceptionCaught(exception, connectionId);
}
Aggregations