1 18 package org.apache.activemq.broker; 19 20 import org.apache.activemq.command.Message; 21 22 30 public class UserIDBroker extends BrokerFilter { 31 32 public UserIDBroker(Broker next) { 33 super(next); 34 } 35 36 public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception { 37 final ConnectionContext context = producerExchange.getConnectionContext(); 38 String userID = context.getUserName(); 39 messageSend.setUserID(userID); 40 super.send(producerExchange, messageSend); 41 } 42 } 43 | Popular Tags |