mirror of https://github.com/apache/activemq.git
[AMQ-9623] Update ConnectionView to include WireFormatInfo
This commit is contained in:
parent
bd91d97861
commit
bb4c8aac66
|
@ -22,6 +22,7 @@ import java.util.Set;
|
||||||
import javax.management.ObjectName;
|
import javax.management.ObjectName;
|
||||||
|
|
||||||
import org.apache.activemq.broker.Connection;
|
import org.apache.activemq.broker.Connection;
|
||||||
|
import org.apache.activemq.broker.TransportConnection;
|
||||||
import org.apache.activemq.util.IOExceptionSupport;
|
import org.apache.activemq.util.IOExceptionSupport;
|
||||||
|
|
||||||
public class ConnectionView implements ConnectionViewMBean {
|
public class ConnectionView implements ConnectionViewMBean {
|
||||||
|
@ -196,4 +197,12 @@ public class ConnectionView implements ConnectionViewMBean {
|
||||||
public long getConnectedTimestamp() {
|
public long getConnectedTimestamp() {
|
||||||
return connection.getConnectedTimestamp();
|
return connection.getConnectedTimestamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getWireFormatInfo() {
|
||||||
|
if(connection instanceof TransportConnection) {
|
||||||
|
return ((TransportConnection)connection).getRemoteWireFormatInfo().toString();
|
||||||
|
}
|
||||||
|
return "WireFormatInfo not available";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,4 +139,11 @@ public interface ConnectionViewMBean extends Service {
|
||||||
*/
|
*/
|
||||||
@MBeanInfo("Time in ms since epoch when connection was established.")
|
@MBeanInfo("Time in ms since epoch when connection was established.")
|
||||||
long getConnectedTimestamp();
|
long getConnectedTimestamp();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the WireFormatInfo information
|
||||||
|
*/
|
||||||
|
@MBeanInfo("WireFormatInfo for the connection")
|
||||||
|
public String getWireFormatInfo();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue