/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @param startBroker whether or not the broker should have its * {@link BrokerService#start()} method called after * construction * @throws Exception */ public static BrokerService createBroker(URI brokerURI, boolean startBroker) throws Exception { if (brokerURI.getScheme() == null) { throw new IllegalArgumentException("Invalid broker URI, no scheme specified: " + brokerURI); } BrokerFactoryHandler handler = createBrokerFactoryHandler(brokerURI.getScheme()); BrokerService broker = handler.createBroker(brokerURI); if (startBroker) { broker.start(); } return broker; }
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @param startBroker whether or not the broker should have its * {@link BrokerService#start()} method called after * construction * @throws Exception */ public static BrokerService createBroker(URI brokerURI, boolean startBroker) throws Exception { if (brokerURI.getScheme() == null) { throw new IllegalArgumentException("Invalid broker URI, no scheme specified: " + brokerURI); } BrokerFactoryHandler handler = createBrokerFactoryHandler(brokerURI.getScheme()); BrokerService broker = handler.createBroker(brokerURI); if (startBroker) { broker.start(); } return broker; }
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @param startBroker whether or not the broker should have its * {@link BrokerService#start()} method called after * construction * @throws Exception */ public static BrokerService createBroker(URI brokerURI, boolean startBroker) throws Exception { if (brokerURI.getScheme() == null) { throw new IllegalArgumentException("Invalid broker URI, no scheme specified: " + brokerURI); } BrokerFactoryHandler handler = createBrokerFactoryHandler(brokerURI.getScheme()); BrokerService broker = handler.createBroker(brokerURI); if (startBroker) { broker.start(); } return broker; }
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @param startBroker whether or not the broker should have its * {@link BrokerService#start()} method called after * construction * @throws Exception */ public static BrokerService createBroker(URI brokerURI, boolean startBroker) throws Exception { if (brokerURI.getScheme() == null) { throw new IllegalArgumentException("Invalid broker URI, no scheme specified: " + brokerURI); } BrokerFactoryHandler handler = createBrokerFactoryHandler(brokerURI.getScheme()); BrokerService broker = handler.createBroker(brokerURI); if (startBroker) { broker.start(); } return broker; }
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @param startBroker whether or not the broker should have its * {@link BrokerService#start()} method called after * construction * @throws Exception */ public static BrokerService createBroker(URI brokerURI, boolean startBroker) throws Exception { if (brokerURI.getScheme() == null) { throw new IllegalArgumentException("Invalid broker URI, no scheme specified: " + brokerURI); } BrokerFactoryHandler handler = createBrokerFactoryHandler(brokerURI.getScheme()); BrokerService broker = handler.createBroker(brokerURI); if (startBroker) { broker.start(); } return broker; }