ahoffer commented on code in PR #4019:
URL: https://github.com/apache/activemq-artemis/pull/4019#discussion_r844360464
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/predicate/ConnectionFilterPredicate.java:
##########
@@ -71,6 +66,17 @@ public boolean test(RemotingConnection connection) {
return true;
}
+ Set<String> collectFromSessions(String connectionId,
Function<ServerSession, String> getter) {
+ List<ServerSession> sessions = server.getSessions(connectionId);
+ Set<String> sessionAttributes = new HashSet<>();
+ for (ServerSession session : sessions) {
+ String value = getter.apply(session);
+ String string = value == null ? "" : value;
+ sessionAttributes.add(string);
+ }
+ return sessionAttributes;
+ }
+
Review Comment:
i thought I reverted this change. At one point, I was pulling validated
users from the sessions associated with the connections and displaying them. I
created this method so that I didn't have to copy and paste code for
getUsername() and getValidatedUser However, I backed those changes out. I
thought I backed this one out too. If you want, I can roll the code back to how
it was.
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/predicate/ConnectionFilterPredicate.java:
##########
@@ -71,6 +66,17 @@ public boolean test(RemotingConnection connection) {
return true;
}
+ Set<String> collectFromSessions(String connectionId,
Function<ServerSession, String> getter) {
+ List<ServerSession> sessions = server.getSessions(connectionId);
+ Set<String> sessionAttributes = new HashSet<>();
+ for (ServerSession session : sessions) {
+ String value = getter.apply(session);
+ String string = value == null ? "" : value;
+ sessionAttributes.add(string);
+ }
+ return sessionAttributes;
+ }
+
Review Comment:
I thought I reverted this change. At one point, I was pulling validated
users from the sessions associated with the connections and displaying them. I
created this method so that I didn't have to copy and paste code for
getUsername() and getValidatedUser However, I backed those changes out. I
thought I backed this one out too. If you want, I can roll the code back to how
it was.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]