/*
 * Copyright 2004-2005 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 *
 *NMTransportFactory.java
 *
 * Created on May 4, 2005, 1:29 PM
 */
package com.sun.enterprise.jbi.serviceengine.bridge.transport;
import javax.xml.namespace.QName;

import com.sun.enterprise.deployment.ServiceRefPortInfo;
import com.sun.xml.rpc.client.ClientTransportFactory;
import com.sun.xml.rpc.client.ClientTransport;

/**
 *
 * @author Manisha Umbarje
 */
public class JAXRPCClientTransportFactory implements ClientTransportFactory {

    //private QName serviceQName;
    private ServiceRefPortInfo portInfo;
    //private Object endpt;
    
    public JAXRPCClientTransportFactory(ServiceRefPortInfo portInfo) {
        //setServiceQName(portInfo.getServiceReference().getServiceName());
        setServicePortInfo(portInfo);
    }
    
    public ClientTransport create() {
        JAXRPCClientTransport transport = new JAXRPCClientTransport();
	//transport.setServiceQName(serviceQName);
        transport.setServicePortInfo(portInfo);
        return transport;
    }

    /*public void setServiceQName(QName q) {
	serviceQName = q;
    }*/

    /*public void setJBIEndpoint(Object e) {
	endpt = e;
    }*/
    
    public void setServicePortInfo(ServiceRefPortInfo portInfo) {
        this.portInfo = portInfo;
    }
}
