com.jp.protection.pub.pro.lserver
Class BasicLicensingServiceProvider.LicensingServiceProxy

java.lang.Object
  extended by com.jp.protection.pub.pro.lserver.BasicLicensingServiceProvider.LicensingServiceProxy
All Implemented Interfaces:
LicensingService, TimeoutHolder
Enclosing class:
BasicLicensingServiceProvider

protected class BasicLicensingServiceProvider.LicensingServiceProxy
extends java.lang.Object
implements LicensingService, TimeoutHolder


Field Summary
protected  java.util.Map fConfirmLicenseLockTimeMap
           
protected  java.util.Map fErrorMessageMap
           
protected  LicensingService fLicensingService
           
protected  java.util.Set fNeedNotifySet
           
protected  long fTimeout
           
 
Fields inherited from interface com.jp.protection.pub.pro.lserver.LicensingService
ATTR_AVAILABLE_PROCESSORS, ATTR_CURRENT_LICENSE_DIGEST, ATTR_GLOBAL_IP_ADDRESS, ATTR_HOST_NAME, ATTR_INSTALL_ID, ATTR_IP_ADDRESS, ATTR_JAVA_VERSION, ATTR_LOGIN, ATTR_MAC_ADDRESS, ATTR_MAC_ADDRESSES, ATTR_PASSWORD, ATTR_TOTAL_MEMORY, ATTR_URL, ATTR_USER_NAME, ATTR_VENDOR_ID
 
Constructor Summary
BasicLicensingServiceProvider.LicensingServiceProxy(LicensingService aLicensingService)
           
 
Method Summary
 LicensingServiceResult canLockLicense(LicenseData.Request aRequest, java.util.Map anAttributes)
          Query the Licensing Server to check whether the license lock can be acquired
 LicensingServiceResult.CheckoutResult checkoutLicense(java.lang.String aTicket, java.util.Map anAttributes)
          Check outs the license to allow offline use
 LicensingServiceResult confirmLicenseLock(java.lang.String aTicket, java.util.Map anAttributes)
          Notifies the Licensing Server that the license lock is still in use
 java.lang.String getErrorMessage(java.lang.String aTicket)
           
 LicensingServiceResult.LicenseResult getLicense(LicenseData.Request aRequest, java.util.Map anAttributes)
          Obtains a license from the Licensing Server
 LicensingService getLicensingService()
           
 long getTimeout()
          Returns license session timeout value
 boolean isExpired(java.lang.String aTicket)
           
 boolean isNeedNotify(java.lang.String aTicket)
           
protected  void licenseLockConfirmed(java.lang.String aTicket)
           
 LicensingServiceResult lockLicense(LicenseData.Request aRequest, java.util.Map anAttributes)
          Acquires license lock using the Licensing Server
 void setErrorMessage(java.lang.String aTicket, java.lang.String aMessage)
           
 void setNeedNotify(java.lang.String aTicket, boolean aNeedNotify)
           
 LicensingServiceResult unlockLicense(java.lang.String aTicket, java.util.Map anAttributes)
          Releases the license lock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fLicensingService

protected LicensingService fLicensingService

fTimeout

protected long fTimeout

fConfirmLicenseLockTimeMap

protected java.util.Map fConfirmLicenseLockTimeMap

fErrorMessageMap

protected java.util.Map fErrorMessageMap

fNeedNotifySet

protected java.util.Set fNeedNotifySet
Constructor Detail

BasicLicensingServiceProvider.LicensingServiceProxy

public BasicLicensingServiceProvider.LicensingServiceProxy(LicensingService aLicensingService)
Method Detail

getLicensingService

public LicensingService getLicensingService()

getLicense

public LicensingServiceResult.LicenseResult getLicense(LicenseData.Request aRequest,
                                                       java.util.Map anAttributes)
Description copied from interface: LicensingService
Obtains a license from the Licensing Server

Specified by:
getLicense in interface LicensingService
Parameters:
aRequest - request which identifies license to get
anAttributes - attributes (identified by ATTR_ keys) which describe client environment.
Returns:
operation result

lockLicense

public LicensingServiceResult lockLicense(LicenseData.Request aRequest,
                                          java.util.Map anAttributes)
Description copied from interface: LicensingService
Acquires license lock using the Licensing Server

Specified by:
lockLicense in interface LicensingService
Parameters:
aRequest - request which identifies license to acquire lock for
anAttributes - attributes (identified by ATTR_ keys) which describe client environment.
Returns:
operation result

canLockLicense

public LicensingServiceResult canLockLicense(LicenseData.Request aRequest,
                                             java.util.Map anAttributes)
Description copied from interface: LicensingService
Query the Licensing Server to check whether the license lock can be acquired

Specified by:
canLockLicense in interface LicensingService
Parameters:
aRequest - request which identifies license to acquire lock for
anAttributes - attributes (identified by ATTR_ keys) which describe client environment.
Returns:
operation result

isExpired

public boolean isExpired(java.lang.String aTicket)

licenseLockConfirmed

protected void licenseLockConfirmed(java.lang.String aTicket)

confirmLicenseLock

public LicensingServiceResult confirmLicenseLock(java.lang.String aTicket,
                                                 java.util.Map anAttributes)
Description copied from interface: LicensingService
Notifies the Licensing Server that the license lock is still in use

Specified by:
confirmLicenseLock in interface LicensingService
Parameters:
aTicket - ticket unique identifies the license session for the lock
anAttributes - attributes (identified by ATTR_ keys) which describe client environment.
Returns:
operation result

unlockLicense

public LicensingServiceResult unlockLicense(java.lang.String aTicket,
                                            java.util.Map anAttributes)
Description copied from interface: LicensingService
Releases the license lock

Specified by:
unlockLicense in interface LicensingService
Parameters:
aTicket - ticket unique identifies the license session for the lock
anAttributes - attributes (identified by ATTR_ keys) which describe client environment.
Returns:
operation result

getTimeout

public long getTimeout()
Description copied from interface: TimeoutHolder
Returns license session timeout value

Specified by:
getTimeout in interface TimeoutHolder
Returns:
license session timeout value

getErrorMessage

public java.lang.String getErrorMessage(java.lang.String aTicket)

setErrorMessage

public void setErrorMessage(java.lang.String aTicket,
                            java.lang.String aMessage)

setNeedNotify

public void setNeedNotify(java.lang.String aTicket,
                          boolean aNeedNotify)

isNeedNotify

public boolean isNeedNotify(java.lang.String aTicket)

checkoutLicense

public LicensingServiceResult.CheckoutResult checkoutLicense(java.lang.String aTicket,
                                                             java.util.Map anAttributes)
Description copied from interface: LicensingService
Check outs the license to allow offline use

Specified by:
checkoutLicense in interface LicensingService
Parameters:
aTicket - ticket unique identifies the license session to checkout
anAttributes - attributes (identified by ATTR_ keys) which describe client environment.
Returns:
operation result