Examples of ProvidersImpl


Examples of org.apache.cxf.jaxrs.impl.ProvidersImpl

    @Test
    public void testWriteXML() throws Exception {
        org.dom4j.Document dom = readXML();
        DOM4JProvider p = new DOM4JProvider();
        p.setProviders(new ProvidersImpl(createMessage()));
       
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        p.writeTo(dom, org.dom4j.Document.class, org.dom4j.Document.class,
            new Annotation[]{}, MediaType.APPLICATION_XML_TYPE, new MetadataMap<String, Object>(),
            bos);
View Full Code Here

Examples of org.apache.cxf.jaxrs.impl.ProvidersImpl

   
    @Test
    public void testWriteJSON() throws Exception {
        org.dom4j.Document dom = readXML();
        DOM4JProvider p = new DOM4JProvider();
        p.setProviders(new ProvidersImpl(createMessage()));
       
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        p.writeTo(dom, org.dom4j.Document.class, org.dom4j.Document.class,
                   new Annotation[]{}, MediaType.APPLICATION_JSON_TYPE, new MetadataMap<String, Object>(),
                   bos);
View Full Code Here

Examples of org.apache.cxf.jaxrs.impl.ProvidersImpl

   
    @Test
    public void testWriteJSONDropRoot() throws Exception {
        org.dom4j.Document dom = readXML("<Document><a/></Document>");
        DOM4JProvider p = new DOM4JProvider();
        p.setProviders(new ProvidersImpl(createMessageWithJSONProvider()));
       
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        p.writeTo(dom, org.dom4j.Document.class, org.dom4j.Document.class,
                   new Annotation[]{}, MediaType.APPLICATION_JSON_TYPE, new MetadataMap<String, Object>(),
                   bos);
View Full Code Here

Examples of org.apache.wink.common.internal.contexts.ProvidersImpl

        initContexts();
    }

    private void initContexts() {
        setAttribute(Providers.class, new ProvidersImpl(getDeploymentConfiguration()
            .getProvidersRegistry(), this));
        setAttribute(HttpHeaders.class, new HttpHeadersImpl(this));
        setAttribute(UriInfo.class, new UriInfoImpl(this));
        setAttribute(SecurityContext.class, new SecurityContextImpl(this));
        setAttribute(Request.class, new RequestImpl(this));
View Full Code Here

Examples of org.apache.wink.common.internal.contexts.ProvidersImpl

                        public double getPriority() {
                            return WinkApplication.SYSTEM_PRIORITY;
                        }
                    });

                    providers = new ProvidersImpl(providersRegistry, runtimeContext);
                }
            }
            MessageBodyReader<T> reader =
                providers.getMessageBodyReader(type, type, EMPTY_ARRAY, mediaType);
            if (reader == null)
View Full Code Here

Examples of org.apache.wink.common.internal.contexts.ProvidersImpl

        initContexts();
    }

    private void initContexts() {
        setAttribute(Providers.class, new ProvidersImpl(getDeploymentConfiguration()
            .getProvidersRegistry(), this));
        setAttribute(HttpHeaders.class, new HttpHeadersImpl(this));
        UriInfoImpl uriInfoImpl = new UriInfoImpl(this);
        setAttribute(UriInfo.class, uriInfoImpl);
        setAttribute(UriInfoImpl.class, uriInfoImpl);
View Full Code Here

Examples of org.apache.wink.common.internal.contexts.ProvidersImpl

                        public double getPriority() {
                            return WinkApplication.SYSTEM_PRIORITY;
                        }
                    });

                    providers = new ProvidersImpl(providersRegistry, runtimeContext);
                }
            }

            /*
             * Need to set a temporary RuntimeContextTLS just in case we're
View Full Code Here

Examples of org.apache.wink.common.internal.contexts.ProvidersImpl

            public InputStream getInputStream() throws IOException {
                return null;
            }
        };
        runtimeContext.setAttribute(Providers.class, new ProvidersImpl(providersRegistry,
                                                                       runtimeContext));
        RuntimeContextTLS.setRuntimeContext(runtimeContext);
    }
View Full Code Here

Examples of org.apache.wink.common.internal.contexts.ProvidersImpl

            setAttribute(Application.class, apps.get(0));
        }
    }

    private void initContexts() {
        setAttribute(Providers.class, new ProvidersImpl(getDeploymentConfiguration()
            .getProvidersRegistry(), this));
        setAttribute(HttpHeaders.class, new HttpHeadersImpl(this));
        UriInfoImpl uriInfoImpl = new UriInfoImpl(this);
        setAttribute(UriInfo.class, uriInfoImpl);
        setAttribute(UriInfoImpl.class, uriInfoImpl);
View Full Code Here

Examples of org.apache.wink.common.internal.contexts.ProvidersImpl

                        public double getPriority() {
                            return WinkApplication.SYSTEM_PRIORITY;
                        }
                    });

                    providers = new ProvidersImpl(providersRegistry, runtimeContext);
                }
            }

            /*
             * Need to set a temporary RuntimeContextTLS just in case we're
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.