1 18 package org.apache.activemq.security; 19 20 import org.apache.activemq.broker.Broker; 21 import org.apache.activemq.broker.BrokerPlugin; 22 23 31 public class AuthorizationPlugin implements BrokerPlugin { 32 33 private AuthorizationMap map; 34 35 public AuthorizationPlugin() { 36 } 37 38 public AuthorizationPlugin(AuthorizationMap map) { 39 this.map = map; 40 } 41 42 public Broker installPlugin(Broker broker) { 43 if (map == null) { 44 throw new IllegalArgumentException ("You must configure a 'map' property"); 45 } 46 return new AuthorizationBroker(broker, map); 47 } 48 49 public AuthorizationMap getMap() { 50 return map; 51 } 52 53 public void setMap(AuthorizationMap map) { 54 this.map = map; 55 } 56 57 } 58 | Popular Tags |