protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception { FtpSenderEndpoint ftpEndpoint = new FtpSenderEndpoint(this, ep); URI uri = new URI(ep.getEndpointName()); Map map = URISupport.parseQuery(uri.getQuery()); IntrospectionSupport.setProperties(ftpEndpoint, map); ftpEndpoint.setUri(uri); ftpEndpoint.validate(); return ftpEndpoint; }
IntrospectionSupport.setProperties(fileEp, map);
@SuppressWarnings("unchecked") public CamelProviderEndpoint createEndpoint(String uriString, JbiComponent jbiComponent) throws URISyntaxException { URI uri = new URI(uriString); Map map = URISupport.parseQuery(uri.getQuery()); String camelUri = uri.getSchemeSpecificPart(); Endpoint camelEndpoint = jbiComponent.getCamelContext().getEndpoint(camelUri); AsyncProcessor processor = jbiComponent.createCamelProcessor(camelEndpoint); CamelProviderEndpoint endpoint = new CamelProviderEndpoint(getServiceUnit(), camelEndpoint, jbiComponent.createBinding(camelEndpoint), processor); IntrospectionSupport.setProperties(endpoint, map); return endpoint; }
protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception { // We receive an exchange for an EPR that has not been used yet. // Register a provider endpoint and restart processing. JmsEndpoint jmsEp = new JmsEndpoint(true); jmsEp.setServiceUnit(new DefaultServiceUnit(component)); jmsEp.setService(ep.getServiceName()); jmsEp.setEndpoint(ep.getEndpointName()); jmsEp.setRole(MessageExchange.Role.PROVIDER); URI uri = new URI(ep.getEndpointName()); Map map = URISupport.parseQuery(uri.getQuery()); if (IntrospectionSupport.setProperties(jmsEp, map, "jms.")) { uri = URISupport.createRemainingURI(uri, map); } if (uri.getPath() != null) { String path = uri.getSchemeSpecificPart(); while (path.startsWith("/")) { path = path.substring(1); } if (path.startsWith(AbstractJmsProcessor.STYLE_QUEUE + "/")) { jmsEp.setDestinationStyle(AbstractJmsProcessor.STYLE_QUEUE); jmsEp.setJmsProviderDestinationName(path.substring(AbstractJmsProcessor.STYLE_QUEUE.length() + 1)); } else if (path.startsWith(AbstractJmsProcessor.STYLE_TOPIC + "/")) { jmsEp.setDestinationStyle(AbstractJmsProcessor.STYLE_TOPIC); jmsEp.setJmsProviderDestinationName(path.substring(AbstractJmsProcessor.STYLE_TOPIC.length() + 1)); } } return jmsEp; }
protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception { // We receive an exchange for an EPR that has not been used yet. // Register a provider endpoint and restart processing. BeanEndpoint endpoint = new BeanEndpoint(this, ep); // TODO //endpoint.setRole(MessageExchange.Role.PROVIDER); // lets use a URL to parse the path URI uri = new URI(ep.getEndpointName()); String beanName = null; // lets try the host first for hierarchial URIs if (uri.getHost() != null) { // it must start bean://host/path beanName = uri.getHost(); } else { // it must be an absolute URI of the form bean:name beanName = uri.getSchemeSpecificPart(); } if (beanName != null) { endpoint.setBeanName(beanName); } else { throw new IllegalArgumentException("No bean name defined for URI: " + uri + ". Please use a URI of bean:name or bean://name?property=value"); } Map map = URISupport.parseQuery(uri.getQuery()); if (endpoint.getBean() == null) { endpoint.setBean(endpoint.createBean()); } IntrospectionSupport.setProperties(endpoint.getBean(), map); return endpoint; }
protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception { // We receive an exchange for an EPR that has not been used yet. // Register a provider endpoint and restart processing. HttpEndpoint httpEp = new HttpEndpoint(true); httpEp.setServiceUnit(new DefaultServiceUnit(component)); httpEp.setService(ep.getServiceName()); httpEp.setEndpoint(ep.getEndpointName()); httpEp.setRole(MessageExchange.Role.PROVIDER); URI uri = new URI(ep.getEndpointName()); Map map = URISupport.parseQuery(uri.getQuery()); if (IntrospectionSupport.setProperties(httpEp, map, "http.")) { uri = URISupport.createRemainingURI(uri, map); } if (httpEp.getLocationURI() == null) { httpEp.setLocationURI(uri.toString()); } return httpEp; }