Enum Class QueryParamStyle

java.lang.Object
java.lang.Enum<QueryParamStyle>
org.eclipse.microprofile.rest.client.ext.QueryParamStyle
All Implemented Interfaces:
Serializable, Comparable<QueryParamStyle>, Constable

public enum QueryParamStyle extends Enum<QueryParamStyle>
A QueryParamStyle enum is used to specify how multiple values are handled when constructing the query portion of the URI. For example, a client interface may take a collection of strings as it's query parameter. This enum determines the style:
 public interface MultiParamClient {
     void sendMultipleQueryParams(@QueryParam("foo") List<String> strings);
 }
 
The style selected when building this client instance will determine the format of the query portion of the URI.
Since:
2.0
  • Enum Constant Details

    • MULTI_PAIRS

      public static final QueryParamStyle MULTI_PAIRS
      Multiple parameter instances, e.g.: foo=v1&foot=v2&foo=v3 This is the default if no style is configured.
    • COMMA_SEPARATED

      public static final QueryParamStyle COMMA_SEPARATED
      A single parameter instance with multiple, comma-separated values, e.g.: foo=v1,v2,v3
    • ARRAY_PAIRS

      public static final QueryParamStyle ARRAY_PAIRS
      Multiple parameter instances with square brackets for each parameter, e.g.: foo[]=v1&foo[]=v2&foo[]=v3
  • Method Details

    • values

      public static QueryParamStyle[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static QueryParamStyle valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null