com.componio.jlicensure.server
Interface JLicensureServer


public interface JLicensureServer

Interface defining the JLicensure server.


Method Summary
 void addLicenseeData(LicenseeData licensee)
          Add new licensee information to the server instance.
 LicenseGrant getLicenseGrant()
          Get the license grant interface
 LicenseStorage getLicenseStorage()
          Get the license storage used by the server.
 License grantLicense(LicenseRequest request)
          The main operation of the licensure server is to grant licenses for given license requests.
 void removeLicenseeData(LicenseeData licensee)
          Remove the given licensee data from this server instance and its storage.
 void setLicenseGrant(LicenseGrant licenseGrant)
          Set the license grant interface
 void setLicenseStorage(LicenseStorage storage)
          Set the license storage to be used by the server.
 void setProperties(java.util.Properties properties)
          Set additional properties that may be used by an implementation.
 boolean verifyCommand(SignedCommand signedCommand)
          Verify the given signed command
 

Method Detail

grantLicense

License grantLicense(LicenseRequest request)
                     throws LicenseNotGrantedException
The main operation of the licensure server is to grant licenses for given license requests.

Parameters:
request - the license request
Returns:
the license
Throws:
LicenseNotGrantedException

verifyCommand

boolean verifyCommand(SignedCommand signedCommand)
                      throws java.security.GeneralSecurityException
Verify the given signed command

Parameters:
signedCommand - the signed command to verify
Returns:
true or false
Throws:
java.security.GeneralSecurityException

addLicenseeData

void addLicenseeData(LicenseeData licensee)
                     throws java.io.IOException
Add new licensee information to the server instance. Usually, the server will pass on the licensee information to the license storage.

Throws:
java.io.IOException

removeLicenseeData

void removeLicenseeData(LicenseeData licensee)
                        throws java.io.IOException
Remove the given licensee data from this server instance and its storage.

Throws:
java.io.IOException

setLicenseStorage

void setLicenseStorage(LicenseStorage storage)
Set the license storage to be used by the server.

Parameters:
storage - license storage

getLicenseStorage

LicenseStorage getLicenseStorage()
Get the license storage used by the server.

Returns:
license storage

setLicenseGrant

void setLicenseGrant(LicenseGrant licenseGrant)
Set the license grant interface

Parameters:
licenseGrant - license grant interface

getLicenseGrant

LicenseGrant getLicenseGrant()
Get the license grant interface

Returns:
LicenseGrant implementation

setProperties

void setProperties(java.util.Properties properties)
Set additional properties that may be used by an implementation.

Parameters:
properties - New value of property properties.