Class RequestUtil


  • final class RequestUtil
    extends java.lang.Object
    Utility class for processing client requests. This class somehow wants to be more than just a utility class for this one filter.
    Since:
    2.3
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.annotation.Annotation[] EMPTY_ANNOTATIONS  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private RequestUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> getEntityParameters​(javax.ws.rs.client.ClientRequestContext request, MessageBodyWorkers messageBodyWorkers)
      Returns the form parameters from a request entity as a multi-valued map.
      static javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> getQueryParameters​(javax.ws.rs.client.ClientRequestContext request)
      Returns the query parameters of a request as a multi-valued map.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • EMPTY_ANNOTATIONS

        private static final java.lang.annotation.Annotation[] EMPTY_ANNOTATIONS
    • Constructor Detail

      • RequestUtil

        private RequestUtil()
    • Method Detail

      • getQueryParameters

        public static javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> getQueryParameters​(javax.ws.rs.client.ClientRequestContext request)
        Returns the query parameters of a request as a multi-valued map.
        Parameters:
        request - the client request to retrieve query parameters from.
        Returns:
        a MultivaluedMap containing the entity query parameters.
      • getEntityParameters

        public static javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> getEntityParameters​(javax.ws.rs.client.ClientRequestContext request,
                                                                                                                   MessageBodyWorkers messageBodyWorkers)
        Returns the form parameters from a request entity as a multi-valued map. If the request does not have a POST method, or the media type is not x-www-form-urlencoded, then null is returned.
        Parameters:
        request - the client request containing the entity to extract parameters from.
        Returns:
        a MultivaluedMap containing the entity form parameters.