Package com.sun.jersey.server.wadl

Examples of com.sun.jersey.server.wadl.WadlApplicationContext


                    WadlApplicationContext.class, wadlApplicationContextInjectionProxy) {});

            // In order for the application to properly marshall the Application
            // object we need to make sure that we provide a JAXBContext that
            // will work
            final WadlApplicationContext wac = wadlApplicationContextInjectionProxy;
            @Provider @Produces({MediaTypes.WADL_STRING,MediaTypes.WADL_JSON_STRING, MediaType.APPLICATION_XML})
            class WadlContextResolver implements ContextResolver<JAXBContext>
            {
                @Override
                public JAXBContext getContext(Class<?> type) {
                   
                    if (com.sun.research.ws.wadl.Application.class.isAssignableFrom(type)) {
                        return wac.getJAXBContext();
                    }
                    else {
                        return null;
                    }
                }
View Full Code Here


    }

    public void init(InjectableProviderFactory ipf, Set<AbstractResource> rootResources) {
        if (!isSupported()) return;

        WadlApplicationContext w = new WadlApplicationContextImpl(rootResources, wadlGenerator);

        ipf.add(new SingletonTypeInjectableProvider<Context, WadlApplicationContext>(
                WadlApplicationContext.class, w) {});
    }
View Full Code Here

TOP

Related Classes of com.sun.jersey.server.wadl.WadlApplicationContext

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.