Package org.objectweb.celtix.bus.management

Source Code of org.objectweb.celtix.bus.management.TransportInstrumentation

package org.objectweb.celtix.bus.management;

import javax.wsdl.Port;
import javax.wsdl.WSDLException;

import org.objectweb.celtix.Bus;
import org.objectweb.celtix.ws.addressing.EndpointReferenceType;
import org.objectweb.celtix.wsdl.EndpointReferenceUtils;

public class TransportInstrumentation {
    protected Bus bus;
    protected String objectName;
    protected String serviceName;
    protected String portName;
   
    public TransportInstrumentation(Bus b) {
        bus = b;
    }

    protected String findServiceName(EndpointReferenceType reference) {
        return EndpointReferenceUtils.getServiceName(
             reference).toString();
    }
   
    protected String findPortName(EndpointReferenceType reference) {     
        Port port = null;
        String name = " ";
        try {
            port = EndpointReferenceUtils.getPort(bus.getWSDLManager(), reference);
            name = port.getName();
        } catch (WSDLException e) {
            // wsdlexception
        }       
        return name;       
    }
   
    protected String getPortObjectName() {
        return ",Bus.Service=\"" + serviceName + "\"" + ",Bus.Service.Port=" + portName;
    }

}
TOP

Related Classes of org.objectweb.celtix.bus.management.TransportInstrumentation

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.