Package org.apache.camel.spi

Examples of org.apache.camel.spi.ComponentResolver.resolveComponent()


        LOG.trace("Finding Component: " + name);
        try {
            ServiceReference[] refs = bundleContext.getServiceReferences(ComponentResolver.class.getName(), "(component=" + name + ")");
            if (refs != null && refs.length > 0) {
                ComponentResolver resolver = (ComponentResolver) bundleContext.getService(refs[0]);
                return resolver.resolveComponent(name, context);
            }
            return null;
        } catch (InvalidSyntaxException e) {
            throw new RuntimeException(e); // Should never happen
        }
View Full Code Here


        }
        try {
            ServiceReference[] refs = bundleContext.getServiceReferences(ComponentResolver.class.getName(), "(component=" + name + ")");
            if (refs != null && refs.length > 0) {
                ComponentResolver resolver = (ComponentResolver) bundleContext.getService(refs[0]);
                return resolver.resolveComponent(name, context);
            }
            return null;
        } catch (InvalidSyntaxException e) {
            throw ObjectHelper.wrapRuntimeCamelException(e);
        }
View Full Code Here

            if (refs != null) {
                for (ServiceReference ref : refs) {
                    Object service = bundleContext.getService(ref);
                    if (ComponentResolver.class.isAssignableFrom(service.getClass())) {
                        ComponentResolver resolver = (ComponentResolver) service;
                        return resolver.resolveComponent(name, context);
                    }
                }
            }
            return null;
        } catch (InvalidSyntaxException e) {
View Full Code Here

        LOG.trace("Finding Component: {}", name);
        try {
            ServiceReference[] refs = bundleContext.getServiceReferences(ComponentResolver.class.getName(), "(component=" + name + ")");
            if (refs != null && refs.length > 0) {
                ComponentResolver resolver = (ComponentResolver) bundleContext.getService(refs[0]);
                return resolver.resolveComponent(name, context);
            }
            return null;
        } catch (InvalidSyntaxException e) {
            throw ObjectHelper.wrapRuntimeCamelException(e);
        }
View Full Code Here

            if (refs != null) {
                for (ServiceReference<?> ref : refs) {
                    Object service = bundleContext.getService(ref);
                    if (ComponentResolver.class.isAssignableFrom(service.getClass())) {
                        ComponentResolver resolver = (ComponentResolver) service;
                        return resolver.resolveComponent(name, context);
                    }
                }
            }
            return null;
        } catch (InvalidSyntaxException e) {
View Full Code Here

        LOG.trace("Finding Component: " + name);
        try {
            ServiceReference[] refs = bundleContext.getServiceReferences(ComponentResolver.class.getName(), "(component=" + name + ")");
            if (refs != null && refs.length > 0) {
                ComponentResolver resolver = (ComponentResolver) bundleContext.getService(refs[0]);
                return resolver.resolveComponent(name, context);
            }
            return null;
        } catch (InvalidSyntaxException e) {
            throw new RuntimeException(e); // Should never happen
        }
View Full Code Here

            if (refs != null) {
                for (ServiceReference<?> ref : refs) {
                    Object service = bundleContext.getService(ref);
                    if (ComponentResolver.class.isAssignableFrom(service.getClass())) {
                        ComponentResolver resolver = (ComponentResolver) service;
                        return resolver.resolveComponent(name, context);
                    }
                }
            }
            return null;
        } catch (InvalidSyntaxException e) {
View Full Code Here

        LOG.trace("Finding Component: " + name);
        try {
            ServiceReference[] refs = bundleContext.getServiceReferences(ComponentResolver.class.getName(), "(component=" + name + ")");
            if (refs != null && refs.length > 0) {
                ComponentResolver resolver = (ComponentResolver) bundleContext.getService(refs[0]);
                return resolver.resolveComponent(name, context);
            }
            return null;
        } catch (InvalidSyntaxException e) {
            throw new RuntimeException(e); // Should never happen
        }
View Full Code Here

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.