Package org.apache.tuscany.sca.interfacedef

Examples of org.apache.tuscany.sca.interfacedef.Interface


    }

    private void mergeFromComponentType(OSGiImplementation impl, ComponentType componentType, ModelResolver resolver) {
        List<Service> services = componentType.getServices();
        for (Service service : services) {
            Interface interfaze = service.getInterfaceContract().getInterface();
            if (interfaze instanceof JavaInterface) {
                JavaInterface javaInterface = (JavaInterface)interfaze;
                if (javaInterface.getJavaClass() == null) {
                    javaInterface.setJavaClass(getJavaClass(resolver, javaInterface.getName()));
                }
                if (service.getInterfaceContract().getCallbackInterface() instanceof JavaInterface) {
                    JavaInterface callbackInterface =
                        (JavaInterface)service.getInterfaceContract().getCallbackInterface();
                    if (callbackInterface.getJavaClass() == null) {
                        callbackInterface.setJavaClass(getJavaClass(resolver, callbackInterface.getName()));
                    }
                }

                impl.getServices().add(service);
            }
        }

        List<Reference> references = componentType.getReferences();
        for (Reference reference : references) {
            Interface interfaze = reference.getInterfaceContract().getInterface();
            if (interfaze instanceof JavaInterface) {
                JavaInterface javaInterface = (JavaInterface)interfaze;
                if (javaInterface.getJavaClass() == null) {
                    javaInterface.setJavaClass(getJavaClass(resolver, javaInterface.getName()));
                }
View Full Code Here


        // Create and set the operation name
        Operation operation = new OperationImpl();
        operation.setName(name);

        // Make the operation remotable
        Interface iface = new InterfaceImpl();
        iface.setRemotable(true);
        operation.setInterface(iface);

        // Construct the parameters
        List<DataType> types = new ArrayList<DataType>();
        DataType<List<DataType>> inputType = new DataTypeImpl<List<DataType>>(Object[].class, types);
View Full Code Here

    public void start() {
        // URI uri = URI.create(component.getURI() + "/" + binding.getName());
        // binding.setURI(uri.toString());

        wire = service.getRuntimeWire(binding);
        Interface serviceInterface = service.getInterfaceContract().getInterface();

        rmiProxy = createRmiService(serviceInterface);

        try {
View Full Code Here

        if (callInterface.getCallbackClass() != null) {
            JavaInterface callbackInterface = javaFactory.createJavaInterface(callInterface.getCallbackClass());
            service.getInterfaceContract().setCallbackInterface(callbackInterface);
        }

        Interface javaInterface = service.getInterfaceContract().getInterface();
        javaInterface.setRemotable(interfaze.getAnnotation(Remotable.class) != null);
        service.getInterfaceContract().setInterface(javaInterface);
        return service;
    }
View Full Code Here

     * @param services
     * @return
     */
    private static boolean isInServiceInterface(Method operation, List<org.apache.tuscany.sca.assembly.Service> services) {
        for (org.apache.tuscany.sca.assembly.Service service : services) {
            Interface interface1 = service.getInterfaceContract().getInterface();
            if (interface1 instanceof JavaInterface) {
                Class<?> clazz = ((JavaInterface)interface1).getJavaClass();
                if (isMethodMatched(clazz, operation)) {
                    return true;
                }
View Full Code Here

        this.serviceName = serviceName;
    }

    public WSDLDefinition getWSDLDefinition() {
        if (wsdlDefinition == null) {
            Interface iface = bindingInterfaceContract.getInterface();
            if (iface instanceof WSDLInterface) {
                wsdlDefinition = ((WSDLInterface) iface).getWsdlDefinition();
            }
        }
        return wsdlDefinition;
View Full Code Here

            // the service interface.  This isn't foolproof, as it's possible that
            // the service interface isn't a Java interface, or that the callback
            // object has the right method signature without implementing the
            // callback interface.  There is code in JavaImplementationInvoker
            // to deal with these possibilities.
            Interface iface = service.getInterfaceContract().getInterface();
            if (iface instanceof JavaInterface) {
                try {
                    Method method = JavaInterfaceUtil.findMethod(((JavaInterface)iface).getJavaClass(), operation);
                    return new JavaImplementationInvoker(operation, method, componentContextProvider.getComponent());
                } catch (NoSuchMethodException e1) {
View Full Code Here

            // Try to match references by type
            Map<String, JavaElementImpl> refMembers = impl.getReferenceMembers();
            for (Reference ref : impl.getReferences()) {
                if (ref.getInterfaceContract() != null) {
                    Interface i = ref.getInterfaceContract().getInterface();
                    if (i instanceof JavaInterface) {
                        Class<?> type = ((JavaInterface)i).getJavaClass();
                        if (!refMembers.containsKey(ref.getName())) {
                            JavaElementImpl e = getMemeber(impl, ref.getName(), type);
                            if (e != null) {
View Full Code Here

            // Try to match references by type
            Map<String, JavaElementImpl> refMembers = impl.getReferenceMembers();
            for (Reference ref : impl.getReferences()) {
                if (ref.getInterfaceContract() != null) {
                    Interface i = ref.getInterfaceContract().getInterface();
                    if (i instanceof JavaInterface) {
                        Class<?> type = ((JavaInterface)i).getJavaClass();
                        if (!refMembers.containsKey(ref.getName())) {
                            JavaElementImpl e = getMemeber(impl, ref.getName(), type);
                            if (e != null) {
View Full Code Here

    private Invoker next;
    private List<Operation> operations;
   
    public HTTPDefaultServiceOperationSelectorInterceptor(RuntimeEndpoint endpoint) {
        Interface serviceInterface = endpoint.getService().getInterfaceContract().getInterface();
        this.operations = serviceInterface.getOperations();
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.interfacedef.Interface

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.