01: package org.objectweb.celtix.bus.management;
02:
03: import javax.wsdl.Port;
04: import javax.wsdl.WSDLException;
05:
06: import org.objectweb.celtix.Bus;
07: import org.objectweb.celtix.ws.addressing.EndpointReferenceType;
08: import org.objectweb.celtix.wsdl.EndpointReferenceUtils;
09:
10: public class TransportInstrumentation {
11: protected Bus bus;
12: protected String objectName;
13: protected String serviceName;
14: protected String portName;
15:
16: public TransportInstrumentation(Bus b) {
17: bus = b;
18: }
19:
20: protected String findServiceName(EndpointReferenceType reference) {
21: return EndpointReferenceUtils.getServiceName(reference)
22: .toString();
23: }
24:
25: protected String findPortName(EndpointReferenceType reference) {
26: Port port = null;
27: String name = " ";
28: try {
29: port = EndpointReferenceUtils.getPort(bus.getWSDLManager(),
30: reference);
31: name = port.getName();
32: } catch (WSDLException e) {
33: // wsdlexception
34: }
35: return name;
36: }
37:
38: protected String getPortObjectName() {
39: return ",Bus.Service=\"" + serviceName + "\""
40: + ",Bus.Service.Port=" + portName;
41: }
42:
43: }
|