public void putDestination(String epName, NMRDestination destination) throws ServiceMixException { if (destinationMap.containsKey(epName)) { throw new ServiceMixException("NMRDestination for Endpoint " + epName + " already be created"); } else { destinationMap.put(epName, destination); } }
public Destination getDestination(EndpointInfo ei) throws IOException { NMRDestination destination = new NMRDestination(ei, nmr); Configurer configurer = bus.getExtension(Configurer.class); if (null != configurer) { configurer.configureBean(destination); } String address = ei.getAddress(); String endpointName = ""; if (address != null && address.startsWith("nmr:")) { if (address.indexOf("?") > 0) { endpointName = address.substring(4, address.indexOf("?")); } else { endpointName = address.substring(4); } } else { endpointName = ei.getName().toString(); } try { putDestination(endpointName + ei.getService().getName().toString() + ei.getInterface().getName().toString(), destination); } catch (ServiceMixException e) { throw new IOException(e.getMessage()); } return destination; }
public void process(Exchange exchange) { if (exchange.getProperty(ServiceEndpoint.class) == null) { exchange.setProperty(ServiceEndpoint.class, this); } try { queue.offer(exchange, Long.MAX_VALUE, TimeUnit.NANOSECONDS); } catch (InterruptedException e) { throw new ServiceMixException(e); } }
new org.apache.cxf.common.i18n.Message("ERROR.PREPARE.MESSAGE", getLogger()) .toString(), ex); throw new ServiceMixException(ex);