| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 | [[java-rest-high-delete-license]]=== Delete License[[java-rest-high-delete-license-execution]]==== ExecutionThe license can be deleted using the `deleteLicense()` method:["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/LicensingDocumentationIT.java[delete-license-execute]--------------------------------------------------[[java-rest-high-delete-license-response]]==== ResponseThe returned `DeleteLicenseResponse` contains the `acknowledged` flag, whichreturns true if the request was processed by all nodes.["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/LicensingDocumentationIT.java[delete-license-response]--------------------------------------------------<1> Check the acknowledge flag. It should be true if license deletion is acknowledged.[[java-rest-high-delete-license-async]]==== Asynchronous ExecutionThis request can be executed asynchronously:["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/LicensingDocumentationIT.java[delete-license-execute-async]--------------------------------------------------<1> The `DeleteLicenseRequest` to execute and the `ActionListener` to use whenthe execution completesThe asynchronous method does not block and returns immediately. Once it iscompleted the `ActionListener` is called back using the `onResponse` methodif the execution successfully completed or using the `onFailure` method ifit failed.A typical listener for `DeleteLicenseResponse` looks like:["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/LicensingDocumentationIT.java[delete-license-execute-listener]--------------------------------------------------<1> Called when the execution is successfully completed. The response isprovided as an argument<2> Called in case of failure. The raised exception is provided as an argument
 |