Package org.apache.tuscany.spi.implementation.java

Examples of org.apache.tuscany.spi.implementation.java.ProcessingException


                // class is the interface
                JavaMappedService service;
                try {
                    service = implService.createService(clazz);
                } catch (InvalidServiceContractException e) {
                    throw new ProcessingException(e);
                }
                type.getServices().put(service.getName(), service);
            } else if (interfaces.size() == 1) {
                JavaMappedService service;
                try {
                    service = implService.createService(interfaces.iterator().next());
                } catch (InvalidServiceContractException e) {
                    throw new ProcessingException(e);
                }
                type.getServices().put(service.getName(), service);
            }
        }
        Set<Method> methods = getAllUniquePublicProtectedMethods(clazz);
View Full Code Here


            if (analyzeInterface(interfaze, nonPropRefMethods)) {
                JavaMappedService service;
                try {
                    service = implService.createService(interfaze);
                } catch (InvalidServiceContractException e) {
                    throw new ProcessingException(e);
                }
                type.getServices().put(service.getName(), service);
            }
        }
    }
View Full Code Here

        reference.setRequired(refAnnotation.required());
        try {
            ServiceContract<?> contract = registry.introspect(param);
            reference.setServiceContract(contract);
        } catch (InvalidServiceContractException e) {
            throw new ProcessingException(e);
        }
        type.getReferences().put(name, reference);
        addName(explicitNames, pos, name);
    }
View Full Code Here

        reference.setRequired(false);
        ServiceContract contract = null;
        try {
            contract = registry.introspect(paramType);
        } catch (InvalidServiceContractException e1) {
            throw new ProcessingException(e1);
        }
        try {
            processCallback(paramType, contract);
        } catch (IllegalCallbackException e) {
            throw new ProcessingException(e);
        }
        reference.setServiceContract(contract);
        return reference;
    }
View Full Code Here

                if (interfaze.getAnnotation(Remotable.class) != null) {
                    JavaMappedService service;
                    try {
                        service = implService.createService(interfaze);
                    } catch (InvalidServiceContractException e) {
                        throw new ProcessingException(e);
                    }
                    type.getServices().put(service.getName(), service);
                }
            }
            return;
        }
        Class<?>[] interfaces = annotation.interfaces();
        if (interfaces.length == 0) {
            Class<?> interfaze = annotation.value();
            if (Void.class.equals(interfaze)) {
                throw new IllegalServiceDefinitionException("No interfaces specified");
            } else {
                interfaces = new Class<?>[1];
                interfaces[0] = interfaze;
            }
        }
        for (Class<?> interfaze : interfaces) {
            if (!interfaze.isInterface()) {
                InvalidServiceType e = new InvalidServiceType("Service must be an interface");
                e.setIdentifier(interfaze.getName());
                throw e;
            }
            JavaMappedService service;
            try {
                service = implService.createService(interfaze);
            } catch (InvalidServiceContractException e) {
                throw new ProcessingException(e);
            }
            type.getServices().put(service.getName(), service);
        }
    }
View Full Code Here

        reference.setName(name);
        ServiceContract contract;
        try {
            contract = regsitry.introspect(method.getParameterTypes()[0]);
        } catch (InvalidServiceContractException e) {
            throw new ProcessingException(e);
        }
        reference.setServiceContract(contract);
        type.getReferences().put(name, reference);
    }
View Full Code Here

        reference.setName(name);
        ServiceContract contract;
        try {
            contract = regsitry.introspect(field.getType());
        } catch (InvalidServiceContractException e) {
            throw new ProcessingException(e);
        }
        reference.setServiceContract(contract);
        type.getReferences().put(name, reference);
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.spi.implementation.java.ProcessingException

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.