Class RestProviderImpl

java.lang.Object
com.labs64.netlicensing.provider.AbstractRestProvider
com.labs64.netlicensing.provider.RestProviderImpl
All Implemented Interfaces:
RestProvider

public class RestProviderImpl extends AbstractRestProvider
Low level REST client implementation.
  • Constructor Details

    • RestProviderImpl

      public RestProviderImpl(String basePath)
      Parameters:
      basePath - base provider path
  • Method Details

    • call

      public <REQ, RES> RestResponse<RES> call(String httpMethod, String urlTemplate, REQ request_arg, Class<RES> responseType, Map<String,String> 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
      Parameters:
      httpMethod - the HTTP method to be used, i.e. GET, PUT, POST.
      urlTemplate - the REST URL urlTemplate.
      request_arg - 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.
      Returns:
      the responseType entity received from the server, or null if responseType is null.
      Throws:
      RestException