com.vs.ezlicrun
Class EzLicExceptionBase

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.vs.ezlicrun.EzLicExceptionBase
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
EzLicExceptionExceededLimits, EzLicExceptionExpired, EzLicExceptionInternal, EzLicExceptionInvalidCustomKey, EzLicExceptionInvalidHostUserNet, EzLicExceptionMalformedKey, EzLicExceptionUnimplemented, EzLicExceptionUnlicensedOption

public class EzLicExceptionBase
extends java.lang.Exception
implements java.io.Serializable

The superclass for all License Management exceptions. Never instantiated directly. The class has 3 parts:
(a) Catching exceptions (what's most interesting to the ISV application): An application that does not need to take specific action on individual exception conditions may catch this exception if it needs to differentiate between license manager and non-license-manager error conditions. If it does not care specifically about license manager errors at all, then even this is not necessary -- it is sufficient to catch Exception. The text of the message is obtained through getMessage(), and the message code is obtained through getMessageCode().
(b) Throwing exceptions (which may be interesting to the ISV if it's interesting to the ISV to explicitly throw an exception from within a custom license key handler, the throwLicenseException() factory method may be used for this purpose, optionally passing up to one integer and one string parameter.
(c) Warning code definitions: these may be referred to for the purpose of managing alerts and warnings to end customers.

See Also:
Serialized Form

Field Summary
static int EZLIC_EXC_BASE
          Base exception code (invalid)
static int EZLIC_EXC_CONFIG
          EasyLicenser configuration error
static int EZLIC_EXC_EXCEEDED_LIMITS
          Exceeded license quota
static int EZLIC_EXC_EXPIRED
          Expired license key
static int EZLIC_EXC_GEN
          Key generation error condition
static int EZLIC_EXC_INTERNAL
          Internal error condition
static int EZLIC_EXC_INVALID_CUSTOM_KEY
          Invalid custom key
static int EZLIC_EXC_INVALID_HOST_USER_NET
          Invalid host or user or network name
static int EZLIC_EXC_MALFORMED_KEY
          Malformed license key
static int EZLIC_EXC_OS
          OS error
static int EZLIC_EXC_UNIMPLEMENTED
          Unimplemented feature
static int EZLIC_EXC_UNLICENSED_OPTION
          Unlicensed option
static int EZLIC_EXC_VENDOR
          Vendor key parse error condition
static int EZLIC_WARN_EXPIRED
          Gone past expiration date and in grace period
static int EZLIC_WARN_EXPIRING
          Expiration date approaching
static int EZLIC_WARN_QUOTA
          Reaching quota limit
static int EZLIC_WARN_QUOTA_EXCEEDED
          Exceeded quota limit and in grace quota
 
Constructor Summary
EzLicExceptionBase()
           
 
Method Summary
 java.lang.String getMessage()
          Get message text.
 int getMessageCode()
          Get message code.
 void setMessage(java.lang.String messageText)
          Set message text.
 void setMessageCode(int messageCode)
          Set message code.
static void throwLicenseException(int exceptionCode, java.lang.String exceptionParams)
          Throw-exception factory method
static void throwLicenseException(java.lang.String messageText, int exceptionCode)
          Throw-exception factory method with explicit message text.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EZLIC_EXC_BASE

public static final int EZLIC_EXC_BASE
Base exception code (invalid)

EZLIC_EXC_MALFORMED_KEY

public static final int EZLIC_EXC_MALFORMED_KEY
Malformed license key

EZLIC_EXC_EXPIRED

public static final int EZLIC_EXC_EXPIRED
Expired license key

EZLIC_EXC_EXCEEDED_LIMITS

public static final int EZLIC_EXC_EXCEEDED_LIMITS
Exceeded license quota

EZLIC_EXC_INVALID_HOST_USER_NET

public static final int EZLIC_EXC_INVALID_HOST_USER_NET
Invalid host or user or network name

EZLIC_EXC_INVALID_CUSTOM_KEY

public static final int EZLIC_EXC_INVALID_CUSTOM_KEY
Invalid custom key

EZLIC_EXC_UNIMPLEMENTED

public static final int EZLIC_EXC_UNIMPLEMENTED
Unimplemented feature

EZLIC_EXC_GEN

public static final int EZLIC_EXC_GEN
Key generation error condition

EZLIC_EXC_VENDOR

public static final int EZLIC_EXC_VENDOR
Vendor key parse error condition

EZLIC_EXC_INTERNAL

public static final int EZLIC_EXC_INTERNAL
Internal error condition

EZLIC_EXC_OS

public static final int EZLIC_EXC_OS
OS error

EZLIC_EXC_CONFIG

public static final int EZLIC_EXC_CONFIG
EasyLicenser configuration error

EZLIC_EXC_UNLICENSED_OPTION

public static final int EZLIC_EXC_UNLICENSED_OPTION
Unlicensed option

EZLIC_WARN_EXPIRING

public static final int EZLIC_WARN_EXPIRING
Expiration date approaching

EZLIC_WARN_QUOTA

public static final int EZLIC_WARN_QUOTA
Reaching quota limit

EZLIC_WARN_EXPIRED

public static final int EZLIC_WARN_EXPIRED
Gone past expiration date and in grace period

EZLIC_WARN_QUOTA_EXCEEDED

public static final int EZLIC_WARN_QUOTA_EXCEEDED
Exceeded quota limit and in grace quota
Constructor Detail

EzLicExceptionBase

public EzLicExceptionBase()
Method Detail

getMessage

public java.lang.String getMessage()
Get message text.
Overrides:
getMessage in class java.lang.Throwable
Returns:
message text

getMessageCode

public int getMessageCode()
Get message code.
Returns:
message code.

setMessage

public void setMessage(java.lang.String messageText)
Set message text.
Parameters:
message - text

setMessageCode

public void setMessageCode(int messageCode)
Set message code.
Parameters:
message - code

throwLicenseException

public static void throwLicenseException(int exceptionCode,
                                         java.lang.String exceptionParams)
                                  throws EzLicExceptionBase
Throw-exception factory method
Parameters:
exceptionCode: - Exception code
exceptionParams: - String representation of exception parameters.
Throws:
EzLicExceptionBase -  

throwLicenseException

public static void throwLicenseException(java.lang.String messageText,
                                         int exceptionCode)
                                  throws EzLicExceptionBase
Throw-exception factory method with explicit message text.
Parameters:
exceptionCode: - exception code
messageText: - exception message text
Throws:
EzLicExceptionBase -