com.vs.ezlicrun
Class EzLicExceptionBase

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.vs.ezlicrun.EzLicExceptionBase
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
EzLicExceptionAuthent, EzLicExceptionConfig, EzLicExceptionExceededLimits, EzLicExceptionExpired, EzLicExceptionGen, EzLicExceptionInternal, EzLicExceptionInvalidCustomKey, EzLicExceptionInvalidHostUserNet, EzLicExceptionMalformedKey, EzLicExceptionNoConfig, EzLicExceptionOS, EzLicExceptionUnimplemented, EzLicExceptionUnlicensedOption, EzLicExceptionUsage, EzLicExceptionVendor

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_AUTHENT
          Authentication error ( for example bad product / app pwd)
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_NO_CONFIG
          EasyLicenser missing-configuration error
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_USAGE
          Usage error ( for example bad parameter)
static int EZLIC_EXC_VENDOR
          Vendor key parse error condition
static int EZLIC_WARN_EXP_GRACE_TRUNC
          Excessive expiration grace specified - truncated to 5 / 25 pct of balance days
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
static int EZLIC_WARN_QUOTA_GRACE_TRUNC
          Excessive quota grace specified - truncated to 5 / 25 pct of 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, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, 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)

See Also:
Constant Field Values

EZLIC_EXC_MALFORMED_KEY

public static final int EZLIC_EXC_MALFORMED_KEY
Malformed license key

See Also:
Constant Field Values

EZLIC_EXC_EXPIRED

public static final int EZLIC_EXC_EXPIRED
Expired license key

See Also:
Constant Field Values

EZLIC_EXC_EXCEEDED_LIMITS

public static final int EZLIC_EXC_EXCEEDED_LIMITS
Exceeded license quota

See Also:
Constant Field Values

EZLIC_EXC_INVALID_HOST_USER_NET

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

See Also:
Constant Field Values

EZLIC_EXC_INVALID_CUSTOM_KEY

public static final int EZLIC_EXC_INVALID_CUSTOM_KEY
Invalid custom key

See Also:
Constant Field Values

EZLIC_EXC_UNIMPLEMENTED

public static final int EZLIC_EXC_UNIMPLEMENTED
Unimplemented feature

See Also:
Constant Field Values

EZLIC_EXC_GEN

public static final int EZLIC_EXC_GEN
Key generation error condition

See Also:
Constant Field Values

EZLIC_EXC_VENDOR

public static final int EZLIC_EXC_VENDOR
Vendor key parse error condition

See Also:
Constant Field Values

EZLIC_EXC_INTERNAL

public static final int EZLIC_EXC_INTERNAL
Internal error condition

See Also:
Constant Field Values

EZLIC_EXC_OS

public static final int EZLIC_EXC_OS
OS error

See Also:
Constant Field Values

EZLIC_EXC_CONFIG

public static final int EZLIC_EXC_CONFIG
EasyLicenser configuration error

See Also:
Constant Field Values

EZLIC_EXC_UNLICENSED_OPTION

public static final int EZLIC_EXC_UNLICENSED_OPTION
Unlicensed option

See Also:
Constant Field Values

EZLIC_EXC_USAGE

public static final int EZLIC_EXC_USAGE
Usage error ( for example bad parameter)

See Also:
Constant Field Values

EZLIC_EXC_AUTHENT

public static final int EZLIC_EXC_AUTHENT
Authentication error ( for example bad product / app pwd)

See Also:
Constant Field Values

EZLIC_EXC_NO_CONFIG

public static final int EZLIC_EXC_NO_CONFIG
EasyLicenser missing-configuration error

See Also:
Constant Field Values

EZLIC_WARN_EXPIRING

public static final int EZLIC_WARN_EXPIRING
Expiration date approaching

See Also:
Constant Field Values

EZLIC_WARN_QUOTA

public static final int EZLIC_WARN_QUOTA
Reaching quota limit

See Also:
Constant Field Values

EZLIC_WARN_EXPIRED

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

See Also:
Constant Field Values

EZLIC_WARN_QUOTA_EXCEEDED

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

See Also:
Constant Field Values

EZLIC_WARN_QUOTA_GRACE_TRUNC

public static final int EZLIC_WARN_QUOTA_GRACE_TRUNC
Excessive quota grace specified - truncated to 5 / 25 pct of quota

See Also:
Constant Field Values

EZLIC_WARN_EXP_GRACE_TRUNC

public static final int EZLIC_WARN_EXP_GRACE_TRUNC
Excessive expiration grace specified - truncated to 5 / 25 pct of balance days

See Also:
Constant Field Values
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:
messageText - Message text to be set.

setMessageCode

public void setMessageCode(int messageCode)
Set message code.

Parameters:
messageCode - 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