Package com.labs64.netlicensing.service
Class NetLicensingService
java.lang.Object
com.labs64.netlicensing.service.NetLicensingService
Provides generic requests to NetLicensing services. This class is supposed to be used by other **Service classes.
-
Method Summary
Modifier and TypeMethodDescriptionprotected <RES> RES
processResponse
(MetaInfo[] meta, Netlicensing netlicensing, Class<RES> resultType) request
(Context context, HttpMethod method, String urlTemplate, Form request, Map<String, String> queryParams) Helper method for performing request to NetLicensing API services.
-
Method Details
-
request
public Netlicensing request(Context context, HttpMethod method, String urlTemplate, Form request, Map<String, String> queryParams) throws NetLicensingExceptionHelper method for performing request to NetLicensing API services. Knows about context for the NetLicensing API calls, does authentication, provides error handling based on status of the response.- Parameters:
context
- context for the NetLicensing API callmethod
- the HTTP method to be used, i.e. GET, POST, DELETEurlTemplate
- the REST URL templaterequest
- The request body to be sent to the server. May be null.queryParams
- The REST query parameters values. May be null if there are no parameters.- Returns:
Netlicensing
response object- Throws:
NetLicensingException
-
processResponse
protected <RES> RES processResponse(MetaInfo[] meta, Netlicensing netlicensing, Class<RES> resultType) throws NetLicensingException - Throws:
NetLicensingException
-