activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From booya1227 <>
Subject How to pass data between methods in BrokerFilter?
Date Mon, 15 Jun 2015 19:54:13 GMT
I have developed a custom BrokerPlugin using BrokerFilter for Security
The plugin performs its own custom authentication in the addConnection()
During the authentication we return an authorization parameter(String) that
us to identify which topic(s) a client is allowed to subscribe. In the
method we determine whether or not a client is allowed to subscribe to a
based on our own search rules using the parameter from the the custom
Therefore, I need to be able to stash the authorization parameter from the
authentication in the addConnection() method so it will be there for
addConsumer() method. 
I had thought I could stash it in the ConnectionContext class, but
setUserName() method 
is protected (not public). I ended up using a HashMap that uses the
ConnectionId as the 
key and store the parameter in the map. Is there a better way to solve the
problem than
using a HashMap? And is there a way that I can use the ConnectionContext
class or any 
other Class?

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message