Added the connection's hashCode to toString().

This would be useful in dump() where it would be possible to link the
EndPoint to the Connection.
This commit is contained in:
Simone Bordet 2016-05-02 16:18:12 +02:00
parent dc258d884e
commit 2ac1b73b55
1 changed files with 4 additions and 2 deletions

View File

@ -212,7 +212,8 @@ public abstract class AbstractEndPoint extends IdleTimeout implements EndPoint
name=c.getSimpleName();
}
return String.format("%s@%x{%s<->%d,%s,%s,%s,%s,%s,%d/%d,%s}",
Connection connection = getConnection();
return String.format("%s@%x{%s<->%d,%s,%s,%s,%s,%s,%d/%d,%s@%x}",
name,
hashCode(),
getRemoteAddress(),
@ -224,6 +225,7 @@ public abstract class AbstractEndPoint extends IdleTimeout implements EndPoint
_writeFlusher.toStateString(),
getIdleFor(),
getIdleTimeout(),
getConnection()==null?null:getConnection().getClass().getSimpleName());
connection == null ? null : connection.getClass().getSimpleName(),
connection == null ? 0 : connection.hashCode());
}
}