Get Licenseedit


The license can be added or updated using the getLicense() method:

GetLicenseRequest request = new GetLicenseRequest();

GetLicenseResponse response = client.license().getLicense(request, RequestOptions.DEFAULT);


The returned GetLicenseResponse contains the license in the JSON format.

String currentLicense = response.getLicenseDefinition(); 

The text of the license.

Asynchronous Executionedit

This request can be executed asynchronously:

    request, RequestOptions.DEFAULT, listener); 

The GetLicenseRequest to execute and the ActionListener to use when the execution completes

The asynchronous method does not block and returns immediately. Once it is completed the ActionListener is called back using the onResponse method if the execution successfully completed or using the onFailure method if it failed.

A typical listener for GetLicenseResponse looks like:

ActionListener<GetLicenseResponse> listener = new ActionListener<GetLicenseResponse>() {
    public void onResponse(GetLicenseResponse indexResponse) {

    public void onFailure(Exception e) {

Called when the execution is successfully completed. The response is provided as an argument

Called in case of failure. The raised exception is provided as an argument