@Query

The {@link oaj.http.annotation.Query @Query} annotation can be applied to arguments of @RemoteMethod-annotated methods to denote that they are query parameters on the request.

Example:

@Remote(path="/myproxy") public interface MyProxy { // Explicit names specified for query parameters. @RemoteMethod String parameters( @Query("foo") String foo, @Query("bar") MyPojo pojo); // Multiple values pulled from a NameValuePairs object. // Same as @Query("*"). @RemoteMethod String nameValuePairs(@Query NameValuePairs nameValuePairs); // Multiple values pulled from a Map. // Same as @Query("*"). @RemoteMethod String map(@Query Map<String,Object> map); // Multiple values pulled from a bean. // Same as @Query("*"). @RemoteMethod String bean(@Query MyBean myBean); // An entire query string as a String. // Same as @Query("*"). @RemoteMethod String string(@Query String string); // An entire query string as a Reader. // Same as @Query("*"). @RemoteMethod String reader(@Query Reader reader); }

Single-part arguments (i.e. those with name != "*") can be any of the following types:

Multi-part arguments (i.e. those with name == "*" or empty) can be any of the following types:

See the link below for information about supported data types in OpenAPI serialization.