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 <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2017-12-14 12:28:46 +01:00
parent ba5ed4c6ce
commit d3db89d7e3
3 changed files with 4 additions and 0 deletions

View File

@ -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;

View File

@ -62,6 +62,7 @@ public class HttpClientTransportOverFCGI extends AbstractConnectorHttpClientTran
});
}
@ManagedAttribute(value = "Whether connections are multiplexed", readonly = true)
public boolean isMultiplexed()
{
return multiplexed;

View File

@ -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;