/** * Sets the network connectors which this broker will use to connect to * other brokers in a federated network */ public void setProxyConnectors(List<?> proxyConnectors) throws Exception { for (Object connector : proxyConnectors) { addProxyConnector((ProxyConnector) connector); } }
/** * Adds a new proxy connector using the given bind address * * @return the newly created and added network connector * @throws Exception */ public ProxyConnector addProxyConnector(String bindAddress) throws Exception { return addProxyConnector(new URI(bindAddress)); }
/** * Adds a new proxy connector using the given bind address * * @return the newly created and added network connector * @throws Exception */ public ProxyConnector addProxyConnector(URI bindAddress) throws Exception { ProxyConnector connector = new ProxyConnector(); connector.setBind(bindAddress); connector.setRemote(new URI("fanout:multicast://default")); return addProxyConnector(connector); }
public BrokerService createBroker(URI brokerURI) throws Exception { CompositeData compositeData = URISupport.parseComposite(brokerURI); Map<String, String> params = new HashMap<String, String>(compositeData.getParameters()); BrokerService brokerService = new BrokerService(); IntrospectionSupport.setProperties(brokerService, params); if (!params.isEmpty()) { String msg = "There are " + params.size() + " Broker options that couldn't be set on the BrokerService." + " Check the options are spelled correctly." + " Unknown parameters=[" + params + "]." + " This BrokerService cannot be started."; throw new IllegalArgumentException(msg); } 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()); } else { brokerService.addConnector(components[i]); } } return brokerService; }
/** * Sets the network connectors which this broker will use to connect to * other brokers in a federated network */ public void setProxyConnectors(List<?> proxyConnectors) throws Exception { for (Object connector : proxyConnectors) { addProxyConnector((ProxyConnector) connector); } }
/** * Sets the network connectors which this broker will use to connect to * other brokers in a federated network */ public void setProxyConnectors(List<?> proxyConnectors) throws Exception { for (Object connector : proxyConnectors) { addProxyConnector((ProxyConnector) connector); } }
/** * Sets the network connectors which this broker will use to connect to * other brokers in a federated network */ public void setProxyConnectors(List<?> proxyConnectors) throws Exception { for (Object connector : proxyConnectors) { addProxyConnector((ProxyConnector) connector); } }
/** * Adds a new proxy connector using the given bind address * * @return the newly created and added network connector * @throws Exception */ public ProxyConnector addProxyConnector(String bindAddress) throws Exception { return addProxyConnector(new URI(bindAddress)); }
/** * Adds a new proxy connector using the given bind address * * @return the newly created and added network connector * @throws Exception */ public ProxyConnector addProxyConnector(String bindAddress) throws Exception { return addProxyConnector(new URI(bindAddress)); }
/** * Adds a new proxy connector using the given bind address * * @return the newly created and added network connector * @throws Exception */ public ProxyConnector addProxyConnector(String bindAddress) throws Exception { return addProxyConnector(new URI(bindAddress)); }
/** * Adds a new proxy connector using the given bind address * * @return the newly created and added network connector * @throws Exception */ public ProxyConnector addProxyConnector(String bindAddress) throws Exception { return addProxyConnector(new URI(bindAddress)); }
/** * Sets the network connectors which this broker will use to connect to * other brokers in a federated network */ public void setProxyConnectors(List proxyConnectors) throws Exception { for (Iterator iter = proxyConnectors.iterator(); iter.hasNext();) { ProxyConnector connector = (ProxyConnector) iter.next(); addProxyConnector(connector); } }
/** * Adds a new proxy connector using the given bind address * * @return the newly created and added network connector * @throws Exception */ public ProxyConnector addProxyConnector(URI bindAddress) throws Exception { ProxyConnector connector = new ProxyConnector(); connector.setBind(bindAddress); connector.setRemote(new URI("fanout:multicast://default")); return addProxyConnector(connector); }
/** * Adds a new proxy connector using the given bind address * * @return the newly created and added network connector * @throws Exception */ public ProxyConnector addProxyConnector(URI bindAddress) throws Exception { ProxyConnector connector = new ProxyConnector(); connector.setBind(bindAddress); connector.setRemote(new URI("fanout:multicast://default")); return addProxyConnector(connector); }
/** * Adds a new proxy connector using the given bind address * * @return the newly created and added network connector * @throws Exception */ public ProxyConnector addProxyConnector(URI bindAddress) throws Exception { ProxyConnector connector = new ProxyConnector(); connector.setBind(bindAddress); connector.setRemote(new URI("fanout:multicast://default")); return addProxyConnector(connector); }
/** * Adds a new proxy connector using the given bind address * * @return the newly created and added network connector * @throws Exception */ public ProxyConnector addProxyConnector(URI bindAddress) throws Exception { ProxyConnector connector = new ProxyConnector(); connector.setBind(bindAddress); connector.setRemote(new URI("fanout:multicast://default")); return addProxyConnector(connector); }
public BrokerService createBroker(URI brokerURI) throws Exception { CompositeData compositeData = URISupport.parseComposite(brokerURI); Map<String, String> params = new HashMap<String, String>(compositeData.getParameters()); BrokerService brokerService = new BrokerService(); IntrospectionSupport.setProperties(brokerService, params); if (!params.isEmpty()) { String msg = "There are " + params.size() + " Broker options that couldn't be set on the BrokerService." + " Check the options are spelled correctly." + " Unknown parameters=[" + params + "]." + " This BrokerService cannot be started."; throw new IllegalArgumentException(msg); } 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()); } else { brokerService.addConnector(components[i]); } } return brokerService; }
public BrokerService createBroker(URI brokerURI) throws Exception { CompositeData compositeData = URISupport.parseComposite(brokerURI); Map<String, String> params = new HashMap<String, String>(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()); } else { brokerService.addConnector(components[i]); } } return brokerService; }
private BrokerService newDefaultBroker(final URI uri) throws Exception { final URISupport.CompositeData compositeData = URISupport.parseComposite(uri); final Map<String, String> params = new HashMap<String, String>(compositeData.getParameters()); final BrokerService brokerService = newPatchedBrokerService(); IntrospectionSupport.setProperties(brokerService, params); if (!params.isEmpty()) { String msg = "There are " + params.size() + " Broker options that couldn't be set on the BrokerService." + " Check the options are spelled correctly." + " Unknown parameters=[" + params + "]." + " This BrokerService cannot be started."; throw new IllegalArgumentException(msg); } if (compositeData.getPath() != null) { brokerService.setBrokerName(compositeData.getPath()); } for (final URI component : compositeData.getComponents()) { if ("network".equals(component.getScheme())) { brokerService.addNetworkConnector(component.getSchemeSpecificPart()); } else if ("proxy".equals(component.getScheme())) { brokerService.addProxyConnector(component.getSchemeSpecificPart()); } else { brokerService.addConnector(component); } } return brokerService; }
public BrokerService createBroker(URI brokerURI) throws Exception { CompositeData compositeData = URISupport.parseComposite(brokerURI); Map<String, String> params = new HashMap<String, String>(compositeData.getParameters()); BrokerService brokerService = new BrokerService(); IntrospectionSupport.setProperties(brokerService, params); if (!params.isEmpty()) { String msg = "There are " + params.size() + " Broker options that couldn't be set on the BrokerService." + " Check the options are spelled correctly." + " Unknown parameters=[" + params + "]." + " This BrokerService cannot be started."; throw new IllegalArgumentException(msg); } 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()); } else { brokerService.addConnector(components[i]); } } return brokerService; }