com.interfaceware.chameleon
Class License

java.lang.Object
  extended by com.interfaceware.chameleon.License

public class License
extends java.lang.Object

This class can be used by customers to automate the registration of Chameleon run-time instances. This class allows you to programmatically register Chameleon on a user's machine without any user input.

Beginning in version 4.5, this class allows you to register Chameleon without the machine being registered having a direct connection to the Internet. This is useful for companies that want to automate the registration code setup for Chameleon. To make it easy for companies to incorporate Chameleon into their existing licensing process, this class allows you to:

(1) Generate a unique Machine ID for the host machine.

(2) Request a non-expiring license for the Machine ID using the user name and password for the host member's account. The automated registration process involves communication with an iNTERFACEWARE server via HTTP. This can be accomplished either from a centrally located computer, or from the actual host machine.

(3) Apply the registration code to the host machine.

This process makes it easy for companies to get the machine IDs centrally using their own licensing, meaning they can add the extra Chameleon information to their own license file.

Please see http://www.interfaceware.com/manual/api_registration.html for details.


Constructor Summary
License()
           
License(long Handle)
           
 
Method Summary
 java.lang.String fetchRegistrationCode(java.lang.String MachineId, java.lang.String EmailAddress, java.lang.String Password, java.lang.String Description)
          Returns the non-expiring runtime registration code for the unique machine ID from iNTERFACEWARE's server.
 java.lang.String fetchTrialRegistrationCode(java.util.Date ExpiryDate, java.lang.String MachineId, java.lang.String EmailAddress, java.lang.String Password, java.lang.String Description)
          Returns the expiring trial registration code for the unique machine ID from iNTERFACEWARE's server.
protected  void finalize()
           
 boolean getIsLicensed()
          Returns true if the machine has a valid Chameleon license.
 java.lang.String getMachineId()
          This method returns the unique machine ID of the machine to register.
 java.lang.String getProxy()
          When a Web proxy is required, this property specifies the IP address or hostname for the Web proxy to use.
 java.lang.String getRegistrationCode(java.util.Date ExpiryDate, java.lang.String LicenseType, java.lang.String MachineId, java.lang.String EmailAddress, java.lang.String Password, java.lang.String Description)
          Returns the expiring trial registration code for the unique machine ID from iNTERFACEWARE's server.
 void registerHost(java.lang.String RegistrationCode)
          This method registers the machine using the given registration code.
 void registerTrialHost(java.lang.String RegistrationCode, java.util.Date ExpiryDate)
          Registers the machine using the given expiring trial registration code and expiry date.
 void release()
           
 void setProxy(java.lang.String Value)
          Set method for proxy.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

License

public License()
        throws ChameleonException
Throws:
ChameleonException

License

public License(long Handle)
        throws ChameleonException
Throws:
ChameleonException
Method Detail

release

public void release()
             throws ChameleonException
Throws:
ChameleonException

finalize

protected void finalize()
                 throws ChameleonException
Overrides:
finalize in class java.lang.Object
Throws:
ChameleonException

getIsLicensed

public boolean getIsLicensed()
                      throws ChameleonException

Returns true if the machine has a valid Chameleon license.

This method checks the license status of the target machine but does not send a request to the iNTERFACEWARE server. It returns true if the machine has a valid Chameleon license and false otherwise.

Throws:
ChameleonException

getProxy

public java.lang.String getProxy()
                          throws ChameleonException

When a Web proxy is required, this property specifies the IP address or hostname for the Web proxy to use.

A Web proxy is required when the local machine does not have direct access to the Internet and needs to forward the registration requests through another server. When it is required, use this property to specify the proxy's IP address or hostname.

A Web proxy server is a server that handles the HTTP requests of its clients by forwarding its requests to other servers (for example, the iNTERFACEWARE server). A client will connect to the Web proxy server to request a file. The proxy server then connects to the specified server and requests the file on behalf of the client.

If your network requires your Internet connection to be set up via a Web proxy, you must specify the proxy your network uses to forward HTTP requests to other servers.

By default, no proxy will be used. To unset a Web proxy, simply set this property to an empty string.

See also the setProxy method.

Throws:
ChameleonException

setProxy

public void setProxy(java.lang.String Value)
              throws ChameleonException

Set method for proxy.

See Proxy.

Parameters:
Value - Value to set proxy to.
Throws:
ChameleonException

getMachineId

public java.lang.String getMachineId()
                              throws ChameleonException

This method returns the unique machine ID of the machine to register.

Throws:
ChameleonException

fetchRegistrationCode

public java.lang.String fetchRegistrationCode(java.lang.String MachineId,
                                              java.lang.String EmailAddress,
                                              java.lang.String Password,
                                              java.lang.String Description)
                                       throws ChameleonException

Returns the non-expiring runtime registration code for the unique machine ID from iNTERFACEWARE's server.

This method is deprecated. Please use RegistrationCode instead as this method will be removed in the future.

This method uses your Internet connection to send an HTTP request on port 80 to the iNTERFACEWARE server. The HTTP request consists of your email address and password (which you use to log into your member's account) and a machine ID uniquely identifying the machine to register. If the request is successful, the iNTERFACEWARE server returns the non-expiring runtime registration code for this unique machine ID. The Description of the registration code will be used to identify it and determine the nature of the license.

Parameters:
MachineId - The Machine ID of the machine to register.
EmailAddress - Email address used to login to iNTERFACEWARE's members site.
Password - Password used to login to iNTERFACEWARE's members site.
Description - A description of the registration code.
Throws:
ChameleonException

registerHost

public void registerHost(java.lang.String RegistrationCode)
                  throws ChameleonException

This method registers the machine using the given registration code.

This method is deprecated. Please use RegistrationCode instead as this method will be removed in the future.

This method checks if the registration code is valid. If the registration code is invalid, the method throws an exception and does not send a request to the iNTERFACEWARE server. If the registration code is valid, this method registers your machine.

This method only supports non-expiring keys.

Parameters:
RegistrationCode - The registration code.
Throws:
ChameleonException

fetchTrialRegistrationCode

public java.lang.String fetchTrialRegistrationCode(java.util.Date ExpiryDate,
                                                   java.lang.String MachineId,
                                                   java.lang.String EmailAddress,
                                                   java.lang.String Password,
                                                   java.lang.String Description)
                                            throws ChameleonException

Returns the expiring trial registration code for the unique machine ID from iNTERFACEWARE's server.

This method is deprecated. Please use RegistrationCode instead as this method will be removed in the future.

This method uses your Internet connection to send an HTTP request on port 80 to the iNTERFACEWARE server. The HTTP request consists of your email address and password (which you use to log into your member's account) and a machine ID uniquely identifying the machine to register. If the request is successful, the iNTERFACEWARE server returns the expiring trial registration code for this unique machine ID. The Description of the registration code will be used to identify it and determine the nature of the license.

Parameters:
ExpiryDate - Returns the expiry date of the registration code.
MachineId - The Machine ID of the machine to register.
EmailAddress - Email address used to login to iNTERFACEWARE's members site.
Password - Password used to login to iNTERFACEWARE's members site.
Description - A description of the registration code.
Throws:
ChameleonException

getRegistrationCode

public java.lang.String getRegistrationCode(java.util.Date ExpiryDate,
                                            java.lang.String LicenseType,
                                            java.lang.String MachineId,
                                            java.lang.String EmailAddress,
                                            java.lang.String Password,
                                            java.lang.String Description)
                                     throws ChameleonException

Returns the expiring trial registration code for the unique machine ID from iNTERFACEWARE's server.

This method uses your Internet connection to send an HTTP request on port 80 to the iNTERFACEWARE server. The HTTP request consists of your email address and password (which you use to log into your member's account) and a machine ID uniquely identifying the machine to register. The request also needs to specify the license type - i.e. 'Chameleon Runtime' etc. If the request is successful, the iNTERFACEWARE server returns the expiring trial registration code for this unique machine ID. The Description of the registration code will be used to identify it and determine the nature of the license.

Parameters:
ExpiryDate - Returns the expiry date of the registration code.
LicenseType - This is the name of license type to allocate as defined in the My Member's account. i.e. 'Chameleon Trial License' etc.
MachineId - The Machine ID of the machine to register.
EmailAddress - Email address used to login to iNTERFACEWARE's members site.
Password - Password used to login to iNTERFACEWARE's members site.
Description - A description of the registration code.
Throws:
ChameleonException

registerTrialHost

public void registerTrialHost(java.lang.String RegistrationCode,
                              java.util.Date ExpiryDate)
                       throws ChameleonException

Registers the machine using the given expiring trial registration code and expiry date.

This method is deprecated. Please use RegistrationCode instead as this method will be removed in the future.

This method checks if the registration code is valid. If the registration code is invalid, the method throws an exception and does not send a request to the iNTERFACEWARE server. If the registration code is valid, this method registers your machine.

Parameters:
RegistrationCode - The registration code.
ExpiryDate - The expiry date of the registration code.
Throws:
ChameleonException