added helper method

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@517659 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2007-03-13 12:08:25 +00:00
parent 93d1087726
commit 0ae6a1d6aa
1 changed files with 12 additions and 1 deletions

View File

@ -30,7 +30,7 @@ import org.apache.activemq.util.IOExceptionSupport;
*/
public class BrokerFactory {
static final private FactoryFinder brokerFactoryHandlerFinder = new FactoryFinder("META-INF/services/org/apache/activemq/broker/");
static final private FactoryFinder brokerFactoryHandlerFinder = new FactoryFinder("META-INF/services/org/apache/activemq/broker/");
public interface BrokerFactoryHandler {
public BrokerService createBroker(URI brokerURI) throws Exception;
@ -58,4 +58,15 @@ public class BrokerFactory {
return broker;
}
/**
* Creates a broker from a URI configuration
* @param brokerURI
* @throws Exception
*/
public static BrokerService createBroker(String brokerURI) throws Exception {
return createBroker(new URI(brokerURI));
}
}