Package javax.ws.rs.core

Examples of javax.ws.rs.core.Request


        EXCHANGE.set(exchange); // used in lazy mode by RESTResourceFinder if cdi beans uses @Context, === initThreadLocal
        CdiAppContextsService.pushRequestReleasable(CleanUpThreadLocal.INSTANCE);

        for (Class<?> type : types) {
            if (Request.class.equals(type)) {
                Request binding = JAXRSUtils.createContextValue(exchange.getInMessage(), null, Request.class);
                ThreadLocalContextManager.REQUEST.set(binding);
            } else if (UriInfo.class.equals(type)) {
                UriInfo binding = JAXRSUtils.createContextValue(exchange.getInMessage(), null, UriInfo.class);
                ThreadLocalContextManager.URI_INFO.set(binding);
            } else if (HttpHeaders.class.equals(type)) {
View Full Code Here


                                                                     final HashMap<String, Object> parameters,
                                                                     final MediaType mediaType) {
        final UriInfo uri = this.mockery.mock(UriInfo.class);
        final HttpServletRequest httpServletRequest = this.mockery.mock(HttpServletRequest.class);

        final Request request = this.mockery.mock(Request.class);
        final Variant variantJson = new Variant(mediaType, null, null);
        final URI requestUriPath = URI.create("http://localhost/graphs/graph/vertices");

        this.mockery.checking(new Expectations() {{
            allowing(httpServletRequest).getParameterMap();
View Full Code Here

                                                                     final HashMap<String, Object> parameters,
                                                                     final MediaType mediaType) {
        final UriInfo uri = this.mockery.mock(UriInfo.class);
        final HttpServletRequest httpServletRequest = this.mockery.mock(HttpServletRequest.class);

        final Request request = this.mockery.mock(Request.class);
        final Variant variantJson = new Variant(mediaType, null, null);
        final URI requestUriPath = URI.create("http://localhost/graphs/graph/edges");

        this.mockery.checking(new Expectations() {{
            allowing(httpServletRequest).getParameterMap();
View Full Code Here

        edgeIndex.put("weight", 1.0, this.toyGraph.getEdge(10));

        final UriInfo uri = this.mockery.mock(UriInfo.class);
        final HttpServletRequest httpServletRequest = this.mockery.mock(HttpServletRequest.class);

        final Request request = this.mockery.mock(Request.class);
        final Variant variantJson = new Variant(mediaType, null, null);
        final URI requestUriPath = URI.create("http://localhost/graphs/graph/indices");

        this.mockery.checking(new Expectations() {{
            allowing(httpServletRequest).getParameterMap();
View Full Code Here

                                                                   final HashMap<String, Object> parameters,
                                                                   final MediaType mediaType) {
        final UriInfo uri = this.mockery.mock(UriInfo.class);
        final HttpServletRequest httpServletRequest = this.mockery.mock(HttpServletRequest.class);

        final Request request = this.mockery.mock(Request.class);
        final Variant variantJson = new Variant(mediaType, null, null);
        final URI requestUriPath = URI.create("http://localhost/graphs/graph");

        this.mockery.checking(new Expectations() {{
            allowing(httpServletRequest).getParameterMap();
View Full Code Here

     * @param types
     */
    public static void bind(Exchange exchange, Set<Class<?>> types) {
        for (Class<?> type : types) {
            if (Request.class.equals(type)) {
                Request binding = JAXRSUtils.createContextValue(exchange.getInMessage(), null, Request.class);
                ThreadLocalContextManager.REQUEST.set(binding);
            } else if (UriInfo.class.equals(type)) {
                UriInfo binding = JAXRSUtils.createContextValue(exchange.getInMessage(), null, UriInfo.class);
                ThreadLocalContextManager.URI_INFO.set(binding);
            } else if (HttpHeaders.class.equals(type)) {
View Full Code Here

        // binding context fields
        for (Field field : cri.getContextFields()) {
            Class<?> type = field.getType();
            if (Request.class.equals(type)) {
                Request binding = JAXRSUtils.createContextValue(exchange.getInMessage(), null, Request.class);
                ThreadLocalContextManager.REQUEST.set(binding);
            } else if (UriInfo.class.equals(type)) {
                UriInfo binding = JAXRSUtils.createContextValue(exchange.getInMessage(), null, UriInfo.class);
                ThreadLocalContextManager.URI_INFO.set(binding);
            } else if (HttpHeaders.class.equals(type)) {
View Full Code Here

TOP

Related Classes of javax.ws.rs.core.Request

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.