*/
public class DefaultBrokerFactory implements BrokerFactoryHandler {
public BrokerService createBroker(URI brokerURI) throws Exception {
CompositeData compositeData = URISupport.parseComposite(brokerURI);
Map params = new HashMap(compositeData.getParameters());
BrokerService brokerService = new BrokerService();
IntrospectionSupport.setProperties(brokerService, params);
if( compositeData.getPath()!=null )
brokerService.setBrokerName(compositeData.getPath());
URI[] components = compositeData.getComponents();
for (int i = 0; i < components.length; i++) {
if( "network".equals(components[i].getScheme()) ) {
brokerService.addNetworkConnector(components[i].getSchemeSpecificPart());
} else if( "proxy".equals(components[i].getScheme()) ) {
brokerService.addProxyConnector(components[i].getSchemeSpecificPart());