Package org.apache.camel.spi

Examples of org.apache.camel.spi.DataFormatResolver


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


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

            ServiceReference[] refs = bundleContext.getServiceReferences(DataFormatResolver.class.getName(), "(dataformat=" + name + ")");
            if (refs != null) {
                for (ServiceReference ref : refs) {
                    Object service = bundleContext.getService(ref);
                    if (DataFormatResolver.class.isAssignableFrom(service.getClass())) {
                        DataFormatResolver resolver = (DataFormatResolver) service;
                        return resolver.resolveDataFormat(name, context);
                    }
                }
            }
            return null;
        } catch (InvalidSyntaxException e) {
View Full Code Here

    protected DataFormat getDataFormat(String name, CamelContext context) {
        LOG.trace("Finding DataFormat: {}", name);
        try {
            ServiceReference[] refs = bundleContext.getServiceReferences(DataFormatResolver.class.getName(), "(dataformat=" + name + ")");
            if (refs != null && refs.length > 0) {
                DataFormatResolver resolver = (DataFormatResolver) bundleContext.getService(refs[0]);
                return resolver.resolveDataFormat(name, context);
            }
            return null;
        } catch (InvalidSyntaxException e) {
            throw ObjectHelper.wrapRuntimeCamelException(e);
        }
View Full Code Here

    protected DataFormat getDataFormat(String name, CamelContext context) {
        LOG.trace("Finding DataFormat: {}", name);
        try {
            ServiceReference[] refs = bundleContext.getServiceReferences(DataFormatResolver.class.getName(), "(dataformat=" + name + ")");
            if (refs != null && refs.length > 0) {
                DataFormatResolver resolver = (DataFormatResolver) bundleContext.getService(refs[0]);
                return resolver.resolveDataFormat(name, context);
            }
            return null;
        } catch (InvalidSyntaxException e) {
            throw ObjectHelper.wrapRuntimeCamelException(e);
        }
View Full Code Here

            ServiceReference<?>[] refs = bundleContext.getServiceReferences(DataFormatResolver.class.getName(), "(dataformat=" + name + ")");
            if (refs != null) {
                for (ServiceReference<?> ref : refs) {
                    Object service = bundleContext.getService(ref);
                    if (DataFormatResolver.class.isAssignableFrom(service.getClass())) {
                        DataFormatResolver resolver = (DataFormatResolver) service;
                        return resolver.resolveDataFormat(name, context);
                    }
                }
            }
            return null;
        } catch (InvalidSyntaxException e) {
View Full Code Here

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

            ServiceReference<?>[] refs = bundleContext.getServiceReferences(DataFormatResolver.class.getName(), "(dataformat=" + name + ")");
            if (refs != null) {
                for (ServiceReference<?> ref : refs) {
                    Object service = bundleContext.getService(ref);
                    if (DataFormatResolver.class.isAssignableFrom(service.getClass())) {
                        DataFormatResolver resolver = (DataFormatResolver) service;
                        return resolver.resolveDataFormat(name, context);
                    }
                }
            }
            return null;
        } catch (InvalidSyntaxException e) {
View Full Code Here

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

TOP

Related Classes of org.apache.camel.spi.DataFormatResolver

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.