Package org.apache.tuscany.core.wire

Examples of org.apache.tuscany.core.wire.WireFactory


    }

    private synchronized Object getInstance(QualifiedName qName, boolean notify) throws TargetException {
        String portName = qName.getPortName();
        WireFactory targetFactory;
        if (portName != null) {
            targetFactory = targetProxyFactories.get(portName);
        } else {
            //FIXME The port name is null here, either locateService needs more information (the expected interface) to
            // select the correct port, or we need to return a factory that matches the whole set of services exposed by
            // the component.
            targetFactory = targetProxyFactories.values().iterator().next();
        }
        if (targetFactory == null) {
            TargetException e = new TargetException("Target service not found");
            e.setIdentifier(qName.getPortName());
            e.addContextName(getName());
            throw e;
        }
        try {
            Object proxy = targetFactory.createProxy(); //createProxy(new Class[] { iface });
            if (notify) {
                publish(new InstanceCreated(this));
            }
            return proxy;
        } catch (ProxyCreationException e) {
View Full Code Here

TOP

Related Classes of org.apache.tuscany.core.wire.WireFactory

Copyright © 2018 www.massapicom. 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.