diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionView.java b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionView.java index 48beb6ce53..593c4f999e 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionView.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionView.java @@ -22,6 +22,7 @@ import java.util.Set; import javax.management.ObjectName; import org.apache.activemq.broker.Connection; +import org.apache.activemq.broker.TransportConnection; import org.apache.activemq.util.IOExceptionSupport; public class ConnectionView implements ConnectionViewMBean { @@ -196,4 +197,12 @@ public class ConnectionView implements ConnectionViewMBean { public long getConnectedTimestamp() { return connection.getConnectedTimestamp(); } + + @Override + public String getWireFormatInfo() { + if(connection instanceof TransportConnection) { + return ((TransportConnection)connection).getRemoteWireFormatInfo().toString(); + } + return "WireFormatInfo not available"; + } } diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionViewMBean.java b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionViewMBean.java index 1013a8e8ba..77eb188f5d 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionViewMBean.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionViewMBean.java @@ -139,4 +139,11 @@ public interface ConnectionViewMBean extends Service { */ @MBeanInfo("Time in ms since epoch when connection was established.") long getConnectedTimestamp(); + + /** + * @return the WireFormatInfo information + */ + @MBeanInfo("WireFormatInfo for the connection") + public String getWireFormatInfo(); + }