Examples of HttpHeadersImpl


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

            MessageBodyReader<?> provider = ((ReaderInterceptorMBR)readers.get(0)).getMBR();
            @SuppressWarnings("rawtypes")
            Class cls = (Class)targetTypeClass;
            return provider.readFrom(
                      cls, parameterType, parameterAnnotations, mediaType,
                      new HttpHeadersImpl(m).getRequestHeaders(), is);
        }
    }
View Full Code Here

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

            return issuerId;
        }
    }
   
    protected boolean checkSecurityContext(Message m) {
        HttpHeaders headers = new HttpHeadersImpl(m);
        Map<String, Cookie> cookies = headers.getCookies();
       
        Cookie securityContextCookie = cookies.get(SSOConstants.SECURITY_CONTEXT_TOKEN);
       
        ResponseState responseState = getValidResponseState(securityContextCookie, m);
        if (responseState == null) {
View Full Code Here

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

   
    protected void copyInputToOutput(InputStream is, OutputStream os,
            MultivaluedMap<String, Object> outHeaders) throws IOException {
        if (isRangeSupported()) {
            Message inMessage = PhaseInterceptorChain.getCurrentMessage().getExchange().getInMessage();
            handleRangeRequest(is, os, new HttpHeadersImpl(inMessage), outHeaders);
        } else {
            IOUtils.copyAndCloseInput(is, os);
        }
    }
View Full Code Here

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

    }
   
    public static String getProtocolHeader(Message m, String name, String defaultValue, boolean setOnMessage) {
        String value = (String)m.get(name);
        if (value == null) {
            value = new HttpHeadersImpl(m).getRequestHeaders().getFirst(name);
            if (value != null && setOnMessage) {
                m.put(name, value);
            }
        }
        return value == null ? defaultValue : value;
View Full Code Here

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

        String requestUri = (String)message.getExchange().getInMessage().get(Message.REQUEST_URI);
        if (requestUri.endsWith("/outfault")) {
            throw new WebApplicationException(403);
        }
       
        HttpHeaders requestHeaders = new HttpHeadersImpl(message.getExchange().getInMessage());
        if (!requestHeaders.getRequestHeader("PLAIN-MAP").isEmpty()) {
            Map<String, List<String>> headers = (Map<String, List<String>>)
                message.get(Message.PROTOCOL_HEADERS);
            if (headers == null) {
                headers = new HashMap<String, List<String>>();
                message.put(Message.PROTOCOL_HEADERS, headers);
View Full Code Here

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

                                             String header,
                                             Class<?> pClass,
                                             Type genericType,
                                             String defaultValue) {
       
        List<String> values = new HttpHeadersImpl(m).getRequestHeader(header);
        if (values != null && values.isEmpty()) {
            values = null;
        }
        return InjectionUtils.createParameterObject(values,
                                                    pClass,
View Full Code Here

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

       
    }

    private static Object processCookieParam(Message m, String cookieName,
                              Class<?> pClass, Type genericType, String defaultValue) {
        List<String> values = new HttpHeadersImpl(m).getRequestHeader(HttpHeaders.COOKIE);
        String theValue = null;
        for (String s : values) {
            if (s.contains(cookieName + "=")) {
                theValue = s;
                break;
View Full Code Here

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

   
    private static HttpHeaders createHttpHeaders(Message m) {
        if (MessageUtils.isRequestor(m)) {
            m = m.getExchange() != null ? m.getExchange().getOutMessage() : m;
        }
        return new HttpHeadersImpl(m);
    }
View Full Code Here

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

                                         parameterAnnotations,
                                         type,
                                         m);
            if (provider != null) {
                try {
                    HttpHeaders headers = new HttpHeadersImpl(m);
                    return provider.readFrom(
                              targetTypeClass, parameterType, parameterAnnotations, contentType,
                              headers.getRequestHeaders(), is);
                } catch (IOException e) {
                    String errorMessage = "Error deserializing input stream into target class "
                                          + targetTypeClass.getSimpleName()
                                           + ", content type : " + contentType;
                    LOG.severe(errorMessage);
View Full Code Here

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

        sbMain.append(sbResources.toString());
        sbMain.append("</application>");
       
        m.getExchange().put(JAXRSUtils.IGNORE_MESSAGE_WRITERS, ignoreMessageWriters);
       
        HttpHeaders headers = new HttpHeadersImpl(m);
        MediaType type = headers.getAcceptableMediaTypes().contains(MediaType.APPLICATION_XML_TYPE)
                      ? MediaType.APPLICATION_XML_TYPE : WADL_TYPE; 
        return Response.ok().type(type).entity(sbMain.toString()).build();
    }
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.