Class RestProviderJersey

  • All Implemented Interfaces:

    public class RestProviderJersey
    extends AbstractRestProvider
    Low level REST client implementation.

    This will also log each request in INFO level.

    • Constructor Detail

      • RestProviderJersey

        public RestProviderJersey​(String basePath)
        basePath - base provider path
    • Method Detail

      • call

        public <REQ,​RES> RestResponse<RES> call​(String httpMethod,
                                                      String urlTemplate,
                                                      REQ request,
                                                      Class<RES> responseType,
                                                      Map<String,​Object> queryParams)
                                               throws RestException
        Description copied from interface: RestProvider
        Helper method for performing REST requests with optional REST parameter map.

        This method has a long list of parameters. It is only intended for internal use.

        Type Parameters:
        REQ - type of the request entity
        RES - type of the responseType entity
        httpMethod - the HTTP method to be used, i.e. GET, PUT, POST.
        urlTemplate - the REST URL urlTemplate.
        request - optional: The request body to be sent to the server. May be null.
        responseType - optional: expected response type. In case no responseType body is expected, responseType may be null.
        queryParams - optional: The REST query parameters values. May be null.
        the responseType entity received from the server, or null if responseType is null.