Skip to content

Commit bb4c8aa

Browse files
committed
[AMQ-9623] Update ConnectionView to include WireFormatInfo
1 parent bd91d97 commit bb4c8aa

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionView.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import javax.management.ObjectName;
2323

2424
import org.apache.activemq.broker.Connection;
25+
import org.apache.activemq.broker.TransportConnection;
2526
import org.apache.activemq.util.IOExceptionSupport;
2627

2728
public class ConnectionView implements ConnectionViewMBean {
@@ -196,4 +197,12 @@ public boolean isNetworkConnection() {
196197
public long getConnectedTimestamp() {
197198
return connection.getConnectedTimestamp();
198199
}
200+
201+
@Override
202+
public String getWireFormatInfo() {
203+
if(connection instanceof TransportConnection) {
204+
return ((TransportConnection)connection).getRemoteWireFormatInfo().toString();
205+
}
206+
return "WireFormatInfo not available";
207+
}
199208
}

activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionViewMBean.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,11 @@ public interface ConnectionViewMBean extends Service {
139139
*/
140140
@MBeanInfo("Time in ms since epoch when connection was established.")
141141
long getConnectedTimestamp();
142+
143+
/**
144+
* @return the WireFormatInfo information
145+
*/
146+
@MBeanInfo("WireFormatInfo for the connection")
147+
public String getWireFormatInfo();
148+
142149
}

0 commit comments

Comments
 (0)