The Licensing Client (Java)
Last updated
Was this helpful?
Last updated
Was this helpful?
The Zentitle.Licensing.Client
library serves as a Java SDK, streamlining the integration of applications with Zentitle2 Licensing API functionality, thus simplifying the implementation task for the developers.
The library provides 2 ways to integrate the Zentitle2 features into your system:
Use the IActivation
interface that represents the Zentitle2 license in your application. This is the preferred approach, as the activation instance handles the state of the license for you, making sure that the activation data is persisted correctly, keeping the number of API calls as low as possible. It provides appropriate methods to move between the possible license states and allows the developers to easily leverage all the Licensing API features.
UseLicensingApiClient
class, which acts as a strongly typed, error-handling proxy for all the calls to the Licensing API. However, it's worth noting that this method is more intricate and not suggested, as it necessitates the developer to implement the logic for persisting and loading the local license state, as well as handling errors and transitioning between the states (such as active or expired) and many other things covered by the IActivation
abstraction.
There are 2 ways of adding the SDK into your application:
Copy & paste the source code into your codebase. This approach will result in a single compiled assembly, which will contain both your app logic as well as licensing features, and it won't allow the attacker to replace the licensing-client.jar
with a malicious one on the hosting machine. On the other side, it will make the process of upgrading the SDK to newer versions much less straightforward. The client code will be provided as a zip file with each release in the notes page.
Reference the licensing-client JAR package. The Jar package targets Java version 8 and newer.
There are various configuration options for the SDK, which are explained on the page.
You can find sample applications using the Java SDK on our GitHub account:
Our client targets Java version 8 and newer.