Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AMQ-9623] Update ConnectionView to include WireFormatInfo #1353

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
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 {
Expand Down Expand Up @@ -196,4 +197,12 @@ public boolean isNetworkConnection() {
public long getConnectedTimestamp() {
return connection.getConnectedTimestamp();
}

@Override
public String getWireFormatInfo() {
if(connection instanceof TransportConnection) {
return ((TransportConnection)connection).getRemoteWireFormatInfo().toString();
}
return "WireFormatInfo not available";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();

}