Package org.apache.camel.spi

Examples of org.apache.camel.spi.DataFormatResolver.resolveDataFormat()


        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


        }
        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

            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

        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

        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

            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

        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

            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

        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
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.