Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.activemq.security.jassjacc
Class PropertiesConfigLoader  view PropertiesConfigLoader download PropertiesConfigLoader.java

java.lang.Object
  extended byorg.activemq.security.jassjacc.PropertiesConfigLoader

public class PropertiesConfigLoader
extends java.lang.Object

Parses a Properties object into a set of BrokerSecurityConfig and DestinationSecurityConfig objects that can be used to secure the ActiveMQ broker. Sample properties configuration:

 
 # Secure a connection the the 'localhost' broker
 connect.roles=admins,traders,brokers,guests
 
 # Secure the TEST_TOPIC topic.
 topic.T1.names=TEST_TOPIC
 topic.T1.consume.roles=traders
 topic.T1.produce.roles=traders,brokers 
 topic.T1.send.roles=traders,brokers 
 
 # You can also secure more than one destination in one go.
 queue.Q1.names=TEST_QUEUE,A_QUEUE,B_QUEUE
 queue.Q1.consume.roles=traders
 queue.Q1.produce.roles=traders,brokers 
 queue.Q1.send.roles=traders,brokers
  
 

Version:
$Revision: 1.1.1.1 $

Field Summary
(package private)  BrokerSecurityConfig brokerSecurityConfig
           
(package private)  java.util.HashMap destinationMap
           
 
Constructor Summary
PropertiesConfigLoader(java.lang.String brokerName, java.util.Properties props)
           
 
Method Summary
 BrokerSecurityConfig getBrokerSecurityConfig()
           
private  java.util.List getDestConfig(java.lang.String type, java.lang.String dest)
           
 DestinationSecurityConfig[] getDestinationSecurityConfigs()
           
 void installSecurity()
           
private  void setDestConsumeRoles(java.lang.String type, java.lang.String dest, java.lang.String[] roles)
           
private  void setDestNames(java.lang.String type, java.lang.String dest, java.lang.String[] names)
           
private  void setDestProduceRoles(java.lang.String type, java.lang.String dest, java.lang.String[] roles)
           
private  void setDestSendRoles(java.lang.String type, java.lang.String dest, java.lang.String[] roles)
           
private static java.lang.String[] trim(java.lang.String[] brokers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

destinationMap

java.util.HashMap destinationMap

brokerSecurityConfig

BrokerSecurityConfig brokerSecurityConfig
Constructor Detail

PropertiesConfigLoader

public PropertiesConfigLoader(java.lang.String brokerName,
                              java.util.Properties props)
                       throws java.io.IOException
Method Detail

setDestSendRoles

private void setDestSendRoles(java.lang.String type,
                              java.lang.String dest,
                              java.lang.String[] roles)
                       throws java.io.IOException

setDestProduceRoles

private void setDestProduceRoles(java.lang.String type,
                                 java.lang.String dest,
                                 java.lang.String[] roles)
                          throws java.io.IOException

setDestConsumeRoles

private void setDestConsumeRoles(java.lang.String type,
                                 java.lang.String dest,
                                 java.lang.String[] roles)
                          throws java.io.IOException

getDestConfig

private java.util.List getDestConfig(java.lang.String type,
                                     java.lang.String dest)
                              throws java.io.IOException

setDestNames

private void setDestNames(java.lang.String type,
                          java.lang.String dest,
                          java.lang.String[] names)
                   throws java.io.IOException

trim

private static java.lang.String[] trim(java.lang.String[] brokers)

getDestinationSecurityConfigs

public DestinationSecurityConfig[] getDestinationSecurityConfigs()

getBrokerSecurityConfig

public BrokerSecurityConfig getBrokerSecurityConfig()

installSecurity

public void installSecurity()