in cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRDestination.java [65:101]
public NMRDestination(EndpointInfo info, NMR nmr) {
super(getTargetReference(info, null), info);
this.nmr = nmr;
this.properties = new HashMap<String, Object>();
String address = info.getAddress();
if (address != null && address.indexOf(Endpoint.RUN_AS_SUBJECT) >= 0) {
String asSubject = address.substring(address.indexOf(Endpoint.RUN_AS_SUBJECT)
+ Endpoint.RUN_AS_SUBJECT.length() + 1);
this.properties.put(Endpoint.RUN_AS_SUBJECT, asSubject);
}
if (address != null && address.startsWith("nmr:")) {
if (address.indexOf("?") > 0) {
this.properties.put(Endpoint.NAME, address.substring(4, address.indexOf("?")));
} else {
this.properties.put(Endpoint.NAME, address.substring(4));
}
} else {
this.properties.put(Endpoint.NAME, info.getName().toString());
}
this.properties.put(Endpoint.SERVICE_NAME, info.getService().getName().toString());
this.properties.put(Endpoint.INTERFACE_NAME, info.getInterface().getName().toString());
if (address.indexOf("?") > 0) {
String[] props = address.substring(address.indexOf("?") + 1).split("&");
for (String prop : props) {
if (prop.indexOf("=") > 0) {
String key = prop.substring(0, prop.indexOf("="));
String val = prop.substring(prop.indexOf("=") + 1);
if (key.equals("synchronous")) {
key = Endpoint.CHANNEL_SYNC_DELIVERY;
}
this.properties.put(key, val);
}
}
}
}