|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jp.protection.pub.pro.lserver.LicensingServiceProviderFactory
public class LicensingServiceProviderFactory
The factory for registering and creation of the providers
Field Summary | |
---|---|
static java.lang.String |
ATTR_LS_ADDRESS
|
static java.lang.String |
ATTR_LS_LOGIN
|
static java.lang.String |
ATTR_LS_PASSWORD
|
protected java.lang.String |
fDefaultProviderName
|
protected static LicensingServiceProviderFactory |
fInstance
|
protected static int |
fLicenseLockConfirmPeriod
|
protected static java.util.Map |
fProtocolProviderMap
|
protected java.util.HashMap |
fProviderAttrsMap
|
protected java.util.HashMap |
fProviderMap
|
Constructor Summary | |
---|---|
LicensingServiceProviderFactory()
|
Method Summary | |
---|---|
LicensingServiceProvider |
createProvider(java.lang.String anAddress,
java.util.Map aProviderAttrs)
Creates a new instance of the LicensingServiceProvider |
LicensingServiceProvider |
createProvider(java.lang.String aName,
java.lang.String anAddress,
java.util.Map aProviderAttrs)
Creates a new instance of the LicensingServiceProvider |
static LicensingServiceProviderFactory |
getInstance()
Returns shared instance of the factory |
static int |
getLicenseLockConfirmPeriod()
Returns the default value for the license lock confirmation period in milliseconds. |
java.lang.String |
getProviderAddress(java.lang.String aName)
Returns default Licensing Server address for given provider name |
java.lang.String[] |
getProviderAddresses()
Returns Licensing Server addresses for all registered providers |
java.lang.String |
getProviderProtocol()
Returns protocol for a default provider |
java.lang.String |
getProviderProtocol(java.lang.String aName)
Returns protocol for a specified provider |
boolean |
hasProviders()
Returns if there are any registered providers |
protected void |
noSuchProviderError(java.lang.String aName)
|
void |
registerProvider(java.lang.String aName,
java.lang.Class aProviderClass,
java.util.Map aProviderAttrs,
boolean isDefault)
Registers a Licensing Service provider implementation |
void |
registerProvider(java.lang.String aName,
java.lang.Class aProviderClass,
java.lang.String anAddress,
java.lang.String aLogin,
java.lang.String aPassword,
boolean isDefault)
Registers Licensing Service provider implementation |
void |
release()
Releases the factory and all of its acquired resources |
static void |
setLicenseLockConfirmPeriod(int aLicenseLockConfirmPeriod)
Specifies default value for the license lock confirmation period in milliseconds. |
void |
unRegisterProvider(java.lang.String aName)
Unregisters a Licensing Service provider implementation for the given name |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static int fLicenseLockConfirmPeriod
protected static LicensingServiceProviderFactory fInstance
protected java.util.HashMap fProviderMap
protected java.util.HashMap fProviderAttrsMap
protected java.lang.String fDefaultProviderName
public static final java.lang.String ATTR_LS_ADDRESS
public static final java.lang.String ATTR_LS_LOGIN
public static final java.lang.String ATTR_LS_PASSWORD
protected static java.util.Map fProtocolProviderMap
Constructor Detail |
---|
public LicensingServiceProviderFactory()
Method Detail |
---|
public static int getLicenseLockConfirmPeriod()
public static void setLicenseLockConfirmPeriod(int aLicenseLockConfirmPeriod)
aLicenseLockConfirmPeriod
- default value for the license lock confirmation period to setpublic static LicensingServiceProviderFactory getInstance()
public void registerProvider(java.lang.String aName, java.lang.Class aProviderClass, java.lang.String anAddress, java.lang.String aLogin, java.lang.String aPassword, boolean isDefault)
aName
- name of the provider implementationaProviderClass
- class of provider implementationanAddress
- default address of the Licensing Server to connectaLogin
- loginaPassword
- passwordisDefault
- specifies whether this implementation is default onepublic void registerProvider(java.lang.String aName, java.lang.Class aProviderClass, java.util.Map aProviderAttrs, boolean isDefault)
aName
- name of the provider implementationaProviderClass
- class of provider implementationaProviderAttrs
- attributes for provider initialization.isDefault
- specifies whether this implementation is default onepublic void unRegisterProvider(java.lang.String aName)
aName
- name of the Licensing Service provider to unregisterpublic void release()
public LicensingServiceProvider createProvider(java.lang.String anAddress, java.util.Map aProviderAttrs)
LicensingServiceProvider
anAddress
- address of the Licensing Server to connectaProviderAttrs
- provider initialization attributes
LicensingServiceProvider
public java.lang.String getProviderAddress(java.lang.String aName)
aName
- provider name to get default Licensing Server address for
public java.lang.String[] getProviderAddresses()
protected void noSuchProviderError(java.lang.String aName) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public java.lang.String getProviderProtocol(java.lang.String aName)
aName
- provider name
public java.lang.String getProviderProtocol()
public LicensingServiceProvider createProvider(java.lang.String aName, java.lang.String anAddress, java.util.Map aProviderAttrs)
LicensingServiceProvider
aName
- provider nameanAddress
- address of the Licensing Server to connectaProviderAttrs
- provider initialization attributes
LicensingServiceProvider
public boolean hasProviders()
true
if there are providers registered; false
otherwise
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |