Package org.glassfish.jersey.jettison

Examples of org.glassfish.jersey.jettison.JettisonJaxbContext


        {
            if (context == null)
            {
                try
                {
                    context = new JettisonJaxbContext(JettisonConfig.DEFAULT, type);
                }
                catch (JAXBException e)
                {
                    // do nothing
                }
View Full Code Here


    private final Set<Class<?>> types;
    private final Class<?>[] cTypes = {Flights.class, FlightType.class, AircraftType.class};

    public JaxbContextResolver() throws Exception {
        this.types = new HashSet<Class<?>>(Arrays.asList(cTypes));
        this.context = new JettisonJaxbContext(JettisonConfig.DEFAULT, cTypes);
    }
View Full Code Here

    public static class MyJaxbContextResolver implements ContextResolver<JAXBContext> {

        JAXBContext context;

        public MyJaxbContextResolver() throws Exception {
            context = new JettisonJaxbContext(JaxbBean.class);
        }
View Full Code Here

        public JAXBContextResolver(final JettisonConfig jsonConfiguration, final Class<?>[] classes,
                                   final boolean forMoxyProvider) throws Exception {
            this.types = new HashSet<>(Arrays.asList(classes));

            if (jsonConfiguration != null) {
                this.context = new JettisonJaxbContext(jsonConfiguration, classes);
            } else {
                this.context = forMoxyProvider ?
                        JAXBContextFactory.createContext(classes, new HashMap()) : JAXBContext.newInstance(classes);
            }
        }
View Full Code Here

        }

        public static class MappedJettisonCR extends CR {

            protected JAXBContext configure(Class[] classes) throws JAXBException {
                return new JettisonJaxbContext(JettisonConfig.mappedJettison().build(), classes);
            }
View Full Code Here

        }

        public static class BadgerFishCR extends CR {

            protected JAXBContext configure(Class[] classes) throws JAXBException {
                return new JettisonJaxbContext(JettisonConfig.badgerFish().build(), classes);
            }
View Full Code Here

    private final Set<Class<?>> types;
    private final Class<?>[] cTypes = {ChangeRecordBean.class};

    public JaxbContextResolver() throws Exception {
        this.types = new HashSet<Class<?>>(Arrays.asList(cTypes));
        this.context = new JettisonJaxbContext(JettisonConfig.DEFAULT, cTypes);
    }
View Full Code Here

TOP

Related Classes of org.glassfish.jersey.jettison.JettisonJaxbContext

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.