From d3db89d7e36355d902aa6e12e2cfdf2af128b007 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Thu, 14 Dec 2017 12:28:46 +0100 Subject: [PATCH] Fixes #2019 - Expose HttpClientTransport in JMX. Added missing @ManagedObject annotation to AbstractConnectorHttpClientTransport. Also exported to JMX the "multiplexed" attribute for the FCGI transport and the "useALPN" attribute for the HTTP/2 transport. Signed-off-by: Simone Bordet --- .../jetty/client/AbstractConnectorHttpClientTransport.java | 2 ++ .../jetty/fcgi/client/http/HttpClientTransportOverFCGI.java | 1 + .../jetty/http2/client/http/HttpClientTransportOverHTTP2.java | 1 + 3 files changed, 4 insertions(+) diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectorHttpClientTransport.java b/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectorHttpClientTransport.java index e50294ba3f5..75b6ef0ee4c 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectorHttpClientTransport.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectorHttpClientTransport.java @@ -35,7 +35,9 @@ import org.eclipse.jetty.io.SocketChannelEndPoint; import org.eclipse.jetty.io.ssl.SslClientConnectionFactory; import org.eclipse.jetty.util.Promise; import org.eclipse.jetty.util.annotation.ManagedAttribute; +import org.eclipse.jetty.util.annotation.ManagedObject; +@ManagedObject public abstract class AbstractConnectorHttpClientTransport extends AbstractHttpClientTransport { private final int selectors; diff --git a/jetty-fcgi/fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/http/HttpClientTransportOverFCGI.java b/jetty-fcgi/fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/http/HttpClientTransportOverFCGI.java index 693c56fb990..15ab4c95850 100644 --- a/jetty-fcgi/fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/http/HttpClientTransportOverFCGI.java +++ b/jetty-fcgi/fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/http/HttpClientTransportOverFCGI.java @@ -62,6 +62,7 @@ public class HttpClientTransportOverFCGI extends AbstractConnectorHttpClientTran }); } + @ManagedAttribute(value = "Whether connections are multiplexed", readonly = true) public boolean isMultiplexed() { return multiplexed; diff --git a/jetty-http2/http2-http-client-transport/src/main/java/org/eclipse/jetty/http2/client/http/HttpClientTransportOverHTTP2.java b/jetty-http2/http2-http-client-transport/src/main/java/org/eclipse/jetty/http2/client/http/HttpClientTransportOverHTTP2.java index 76a5cf036eb..7815d9c946c 100644 --- a/jetty-http2/http2-http-client-transport/src/main/java/org/eclipse/jetty/http2/client/http/HttpClientTransportOverHTTP2.java +++ b/jetty-http2/http2-http-client-transport/src/main/java/org/eclipse/jetty/http2/client/http/HttpClientTransportOverHTTP2.java @@ -68,6 +68,7 @@ public class HttpClientTransportOverHTTP2 extends AbstractHttpClientTransport return client.getSelectors(); } + @ManagedAttribute(value = "Whether ALPN should be used when establishing connections") public boolean isUseALPN() { return useALPN;