Skip to content

Commit

Permalink
Add message size to status-title.
Browse files Browse the repository at this point in the history
Signed-off-by: Achim Kraus <[email protected]>
  • Loading branch information
boaks committed Sep 21, 2022
1 parent c3b6666 commit 15fbc7b
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ private void showResponse(Response response, List<String> path) {
}
text = links.toString();
if (!show) {
text = "(DISCOVER to update Resources for new host " + getHost() + ")\n" + text;
text = "(DISCOVER to update Resources for new host " + getHost() + ")\n" + text;
}
} catch (Throwable t) {
LOG.error("Link response:", t);
Expand Down Expand Up @@ -996,9 +996,7 @@ private void showResponse(Response response, List<String> path) {
if (!mediaTypeShown) {
info += ", mediaType=" + mediaType;
}
if (response.getBytes() != null) {
info += ", " + response.getBytes().length + " bytes.";
}
info += ", " + response.getPayloadSize() + "/" + response.getMessageSize() + " bytes.";
responseTitle.setText(info);
}

Expand Down Expand Up @@ -1123,6 +1121,7 @@ private void showEndpointContext(String scheme, EndpointContext context) {
private static final SimpleDateFormat FORMAT = new SimpleDateFormat("MMM d. HH:mm:ss [SSS]");

private class ResponsePrinter extends MessageObserverAdapter {

private final AtomicBoolean connect = new AtomicBoolean();
private final AtomicBoolean reconnect = new AtomicBoolean();
private final AtomicInteger retransmission = new AtomicInteger();
Expand All @@ -1145,9 +1144,9 @@ public void onReadyToSend() {
text.append(" ").append(request.getType());
text.append(", token=").append(request.getTokenString());
text.append(", mid=").append(request.getMID());
if (request.getBytes() != null) {
text.append(", ").append(request.getBytes().length).append(" bytes.");
}
text.append(", ").append(request.getPayloadSize());
text.append("/").append(request.getMessageSize());
text.append(" bytes.");
requestTitle.setText(text.toString());
}
});
Expand Down Expand Up @@ -1365,8 +1364,9 @@ public static String logMessage(Request request, Exception ex) {
}

private static class PathElement {
private String displayElement;
private String uriElement;

private final String displayElement;
private final String uriElement;

private PathElement(String uriElement) {
this.uriElement = uriElement;
Expand Down

0 comments on commit 15fbc7b

Please sign in to comment.