Interface LicenseManager
public interface LicenseManager
{
// Methods
public void decrypt() throws LicenseException;
public void encrypt() throws LicenseException;
public LicenseDescriptor[] getLicenseDescriptors();
public void readLicense(Object obj) throws java.io.IOException;
public void readLicense(String server) throws java.io.IOException;
public void writeLicense(PrintStream stream,
LicenseDescriptor desc[]) throws java.io.IOException;
}
This interface serves as a specification for how to implement a license manager. It describes all of the facilities needed to perform the licensing function.
public void decrypt() throws LicenseException;
Calls the decryption engine to decrypt a license file.
Return Value:
No return value.
Exceptions:
com.ms.license.LicenseException
if the license could not be decrypted.
public void encrypt() throws LicenseException;
Calls the encryption engine to encrypt a license file.
Return Value:
No return value.
Exceptions:
com.ms.license.LicenseException
if the license could not be encrypted.
public LicenseDescriptor[] getLicenseDescriptors();
Retrieves the license descriptors for the object.
Return Value:
Returns LicenseDescriptor An array of LicenseDescriptor objects.
public void readLicense(Object obj) throws java.io.IOException;
Reads a license file from a disk.
Return Value:
No return value. @exeception IOException if the read failed.
Parameter | Description |
obj
| The object used to read the license file.
|
public void readLicense(String server) throws java.io.IOException;
Reads a license from a server.
Return Value:
No return value.
Parameter | Description |
server
| The server to get the license file from.
|
Exceptions:
IOException
if the read failed.
public void writeLicense(PrintStream stream,
LicenseDescriptor desc[]) throws java.io.IOException;
Creates a new license file and writes the contents of the LicenseDescriptor objects.
Return Value:
No return value.
Parameter | Description |
stream
| The stream to write the license file to.
|
desc
| An array of LicenseDescriptor objects.
|
Exceptions:
IOException
if the write failed.