Zentitle SDK and Library
Public Member Functions | List of all members
com.nalpeiron.nalplibrary.NSL Class Reference

Public Member Functions

 NSL (NALP nalp, int oset)
 
void NSLSetLicNo (String licNo)
 
String NSLGetLicNo ()
 
String callNSLGetVersion () throws nalpError
 Gets the vewrsion of the NSL library being accessed. See NSLGetVersion() More...
 
String callNSLGetComputerID () throws nalpError
 Gets the computer ID of the current system. See NSLGetComputerID(). More...
 
String callNSLGetHostName () throws nalpError
 Get the name or IP address of the Nalpeiron server or daemon used for licensing. See NSLGetHostName(). More...
 
int callNSLGetLeaseExpSec () throws nalpError
 Get the lease expiration time in seconds. See NSLGetLeaseExpSec(). More...
 
String callNSLGetLeaseExpDate () throws nalpError
 Get the lease expiration date. See NSLGetLeaseExpDate(). More...
 
int callNSLGetRefreshExpSec () throws nalpError
 Get remaining seconds until refresh. Available only on certain platforms. More...
 
String callNSLGetRefreshExpDate () throws nalpError
 Get the refresh date. Available only on certain platforms. More...
 
int callNSLGetSubExpSec () throws nalpError
 Get the seconds remaining in the subscription period. See NSLGetSubExpSec(). More...
 
String callNSLGetSubExpDate () throws nalpError
 Get the end date of the subscription period. See NSLGetSubExpDate(). More...
 
int callNSLGetMaintExpSec () throws nalpError
 Get the number of seconds remaining in the maintanence period. See NSLGetMaintExpSec(). More...
 
String callNSLGetMaintExpDate () throws nalpError
 Get the expiration date of the maintanence period. See NSLGetMaintExpDate(). More...
 
int callNSLGetTrialExpSec () throws nalpError
 Get the number of seconds remaining in the trial period. See NSLGetTrialExpSec(). More...
 
String callNSLGetTrialExpDate () throws nalpError
 Get the date of the trial expiration. See NSLGetTrialExpDate(). More...
 
int callNSLGetLicense (String licenseNo, String xmlRegInfo) throws nalpError
 Contacts the SOAP server for a new license or a license refresh. See NSLGetLicense() More...
 
int callNSLObtainLicense (String licenseNo, String xmlRegInfo, String specialID) throws nalpError
 Contacts the SOAP server for a new license or a license refresh. See NSLObtainLicense() More...
 
int callNSLReturnLicense (String licenseNo) throws nalpError
 Returns the current license to the Nalpeiron server. See NSLReturnLicense(). More...
 
int callNSLImportCertificate (String licenseNo, String cert) throws nalpError
 Imports a license from the given certificate. See NSLImportCertificate(). More...
 
String callNSLGetActivationCertReq (String licenseNo, String xmlRegInfo) throws nalpError
 Generate an request for a activation certificate from the Nalpeiron server (ie offline activation). The resulting request can be emailed or otherwise sent to Nalpeiron. See NSLGetActivationCertReq(). More...
 
String callNSLRequestActivationCert (String licenseNo, String xmlRegInfo, String specialID) throws nalpError
 Generate an request for a activation certificate from the Nalpeiron server (ie offline activation). The resulting request can be emailed or otherwise sent to Nalpeiron. See NSLRequestActivationCert (/ref NSLRequestActivationCert). More...
 
String callNSLGetDeactivationCertReq (String licenseNo) throws nalpError
 Generate a request for a deactivation certificate from the Nalpeiron server (ie offline deactivation). The resulting request can be emailed or otherwise sent to Nalpeiron. See NSLGetDeactivationCertReq(). More...
 
int callNSLValidateLibrary (int custID, int prodID) throws nalpError
 Verifies that the shared library you are accessing is the library you stamped at Nalpeiron's website. It does this by checking the customerID and productID sent in against the stamped values. See NSLValidateLibrary(). Any negative return value, even if it is not a known error code, is cause to consider the library invalid. More...
 
int callNSLGetLicenseStatus () throws nalpError
 Retrieves the status of the current license. Negative values indicate an invalid license state. See NSLGetLicenseStatus(). More...
 
int callNSLGetLicenseType () throws nalpError
 Retrieves the license type for the current license. See NSLGetLicenseInfo(). More...
 
long callNSLGetLibraryOptions () throws nalpError
 Retrieves the library stamp options for the current library. See NSLGetLibraryOptions(). More...
 
String callNSLGetVMInfo () throws nalpError
 Retrieves virtual machine information for the system. See NSLGetVMInfo(). More...
 
int callNSLGetActivationType () throws nalpError
 Retrieves the activation type for the current license. See NSLGetLicenseInfo(). More...
 
int callNSLGetMaxProcs () throws nalpError
 If the number of concurrent processes was limited when the system's license was created, this function will return the maximum number of allowed processes. More...
 
int callNSLGetAvailProcs () throws nalpError
 If the number of concurrent processes was limited when the system's license was created, this function will return the number of allowed processes still remaining for use. More...
 
String callNSLGetLicenseCode () throws nalpError
 Retrieves the license code used with the current license. NOTE: a license code will only be present if one has already been assigned to the current license via NSLGetLicense, NSLImportCert, etc. See NSLGetLicenseCode(). More...
 
int callNSLGetTimeStamp () throws nalpError
 Retrieves the current time (seconds since epoch start) from the Nalpeiron daemon or server. See NSLGetTimeStamp(). More...
 
int callNSLGetFeatureStatus (String featureName) throws nalpError
 Checks the current license for the status of featureName. See NSLGetFeatureStatus(). More...
 
int callNSLCheckoutFeature (String featureName, String licenseNo) throws nalpError
 Checkout one use of a "floating feature" from the Nalpeiron server or daemon. On return featureStatus will contain the feature status code. In addition to checking the return value of the function, the feature status code must also be checked to ensure a feature seat was available. See NSLCheckoutFeature(). More...
 
int callNSLReturnFeature (String featureName, String licenseNo) throws nalpError
 Return one use of a "floating feature" to the Nalpeiron server or daemon. See NSLReturnFeature(). More...
 
int callNSLGetPoolStatus (String poolName) throws nalpError
 Get the number of pool elements checked out from the named pool. See NSLGetPoolStatus(). More...
 
int callNSLGetPoolInfo (String poolName) throws nalpError
 Get the number of pool elements checked out from the named pool. See NSLGetPoolInfo(). More...
 
int callNSLGetPoolMax (String poolName) throws nalpError
 Get the number of pool elements in the named pool. See NSLGetPoolMax(). More...
 
int callNSLCheckoutPool (String poolName, String licenseNo, int amt) throws nalpError
 Withdraws a specified number of elements from an element pool. See NSLCheckoutPool(). More...
 
int callNSLReturnPool (String poolName, String licenseNo, int amt) throws nalpError
 Returns a specified number of elements to an element pool. See NSLReturnPool(). More...
 
int callNSLGetTokenInfo (String tokenName) throws nalpError
 Get information about tokens checked out from the named pool. See NSLGetTokenInfo(). More...
 
int callNSLCheckoutTokens (String tokenName, String licenseNo, int amt) throws nalpError
 Withdraws a specified number of tokens from an token pool. See NSLCheckoutTokens(). More...
 
int callNSLConsumeTokens (String tokenName, String licenseNo, int amt) throws nalpError
 Consumes the specified number of tokens from an tokens checkedout by NSLCheckoutTokens onto local machine. More...
 
int callNSLReturnTokens (String tokenName, String licenseNo, int amt) throws nalpError
 Returns the specified number of tokens from the local machine to the Nalpeiron server. More...
 
String callNSLGetUDFValue (String UDFName) throws nalpError
 Retrieve the value of a UDF (AA). See callNSLGetUDFValue(). More...
 
String callNSLReadSecStore (String rawkey, String storename) throws nalpError
 Retrieve the value of a Secure Store. See callNSLReadSecStore(). More...
 
int callNSLWriteSecStore (String rawkey, String storename, String secstorevalue) throws nalpError
 Write the value to a Secure Store. See callNSLWriteSecStore(). More...
 
String callNSLRemoteCallV (String rpcName, String[] varNames, String[] varValues) throws nalpError
 Call a remote proceedure on the Nalpeiron server. More...
 
int callNSLRegister (String licenseNo, String xmlRegInfo) throws nalpError
 : Call registration function. Available only on certain platforms. More...
 
int callNSLTestConnection () throws nalpError
 : Tests the network connection to Nalpeiron. See NSLTestConnection(). More...
 
int callNSLTestConnection2 (long connTO, long transTO) throws nalpError
 : Tests the network connection to Nalpeiron. See NSLTestConnection2(). More...
 
int callNSLSetCredentials (String classname, String methname, String username, String password, String inData) throws nalpError
 Set username and password for future logins to the Nalpeiron licensing server or for a user provided authentication callback function. More...
 
int callNSLSetCredentialsSSO (String ssoToken, String inData) throws nalpError
 This function mirrors the functionality of NSLSetCredentials but uses a JWT (JSON Web Token) to gather the needed authentication information. More...
 
int callNSLCheckCredentials () throws nalpError
 Validate credentials passed into the library with NSLSetCredentials against any stored in the license file. When a program with an ABL license has been shutdown without a ReturnLicense or a ClearCredentials the credentials are cached in the license file. Once the library is restarted before the license file's entitlements can be accessed those credentials must be verified. This state is indicated by a -70 license status. The verification is done using this call. More...
 
int callNSLGetCredentials (String[] creds) throws nalpError
 Get information from the last SetCredentials (or callback) call. More...
 
int callNSLClearCredentials () throws nalpError
 : Clear credentials set for use with Nalpeiron server and named license More...
 
String callNSLGetNewLicenseCode (String profile) throws nalpError
 : Call to get a new license. Available only on certain platforms. More...
 
String callNSLGetPreset (int messageNo) throws nalpError
 : Call to get a preset messages. Available only on certain platforms. More...
 
ArrayList< String > callNSLGetMsgByDate () throws nalpError
 : Call to get a current messages. Available only on certain platforms. More...
 

Constructor & Destructor Documentation

com.nalpeiron.nalplibrary.NSL.NSL ( NALP  nalp,
int  oset 
)
inline

Member Function Documentation

int com.nalpeiron.nalplibrary.NSL.callNSLCheckCredentials ( ) throws nalpError
inline

Validate credentials passed into the library with NSLSetCredentials against any stored in the license file. When a program with an ABL license has been shutdown without a ReturnLicense or a ClearCredentials the credentials are cached in the license file. Once the library is restarted before the license file's entitlements can be accessed those credentials must be verified. This state is indicated by a -70 license status. The verification is done using this call.

If the cached credentials are a username/password combination that was initially validated by the Nalpeiron server then the username and password passed to NSLSetCredentials will be validated against those stored in the license file. NOTE the password is never stored or transmitted in plain text.

If the cached credentials were initially verified by a callback function then that callback will be called to verify the password and username passed to NSLSetCredentials.

If the cache credentials were initially verified by a callback with authentication token then that token will need to be passed back to the library from the callback function. The username and token will be verified against those stored in the license file.

Returns
= 0 If the call succeeded
< 0 A negative error value is returned (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLCheckoutFeature ( String  featureName,
String  licenseNo 
) throws nalpError
inline

Checkout one use of a "floating feature" from the Nalpeiron server or daemon. On return featureStatus will contain the feature status code. In addition to checking the return value of the function, the feature status code must also be checked to ensure a feature seat was available. See NSLCheckoutFeature().

Parameters
featureNamea string containing the five (5) character feature code of the feature to be checked out.
licenseNothe license number of the current, valid system license
Returns
An integer representing the status of the checked-out feature (FEATSTATUS)
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLCheckoutPool ( String  poolName,
String  licenseNo,
int  amt 
) throws nalpError
inline

Withdraws a specified number of elements from an element pool. See NSLCheckoutPool().

Parameters
poolNamea string containing the five (5) character pool code of the pool to be withdrawn from.
licenseNothe license number of the current, valid system license
amtthe number of elements to withdraw from the pool
Returns
The status of the pool (FEATSTATUS)
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLCheckoutTokens ( String  tokenName,
String  licenseNo,
int  amt 
) throws nalpError
inline

Withdraws a specified number of tokens from an token pool. See NSLCheckoutTokens().

Parameters
tokenNamea string containing the five (5) character code of the token pool to be withdrawn from.
licenseNothe license number of the current, valid system license
amtthe number of elements to withdraw from the pool
Returns
The status of the token (FEATSTATUS)
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLClearCredentials ( ) throws nalpError
inline

: Clear credentials set for use with Nalpeiron server and named license

Returns
0 on success
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLConsumeTokens ( String  tokenName,
String  licenseNo,
int  amt 
) throws nalpError
inline

Consumes the specified number of tokens from an tokens checkedout by NSLCheckoutTokens onto local machine.

Parameters
tokenNamea string containing the five (5) character code of the token pool to be consumed from.
licenseNothe license number of the current, valid system license
amtthe number of elements to consume.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLGetActivationCertReq ( String  licenseNo,
String  xmlRegInfo 
) throws nalpError
inline

Generate an request for a activation certificate from the Nalpeiron server (ie offline activation). The resulting request can be emailed or otherwise sent to Nalpeiron. See NSLGetActivationCertReq().

Deprecated:
June 2020 This function is deprecated and will be removed from a future version of the NSL library. Use callNSLRequestActivationCert (callNSLRequestActivationCert) instead.
Parameters
licenseNothe license number to be used in creating the certificate request. If the licenseNo is NULL, an attempt for a trial license certificate will be made.
xmlRegInfoOptional registration information may be passed to the Nalpeiron server using the xmlRegInfo string. If there is no registration information, this pointer should be NULL.
Returns
A string containing the activation certificate request. NOTE the byte array used to hold the cert is allocated to 16384 bytes. This is large enough for most activation requests. However, you will need to monitor the size of your of your certificate and increase this size as needed. If you receive a -9015 "Java or JNI memory error" return from this function the most likely cause is a nslCert array that is too small.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetActivationType ( ) throws nalpError
inline

Retrieves the activation type for the current license. See NSLGetLicenseInfo().

Returns
An unsigned 32 bit integer representing the activation type. (LICTYPE)
Exceptions
nalpErrorIf there was a problem calling the NSLfunction, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetAvailProcs ( ) throws nalpError
inline

If the number of concurrent processes was limited when the system's license was created, this function will return the number of allowed processes still remaining for use.

A license may limit the number of simultaneous copies allowed to run on a specific computer. This limit is disabled by default and, if desired, must be enabled on the Nalpeiron server. The number of copies available is set to noProcs+1 and availProc is the number of copies still available for use. When an application instance is started and returns availProc=0, the number of instances exceeds the maximum allowed and this instance should be terminated.

When disabled, this fuction will always return zero (0) as noProcs and one (1) as the number of availProc. NOTE limiting the number of processes allowed on a machine ("Number of concurrent Processes" setting on server) is not affected by the "Concurrency Mode" setting. See NSLGetNumbAvailProc()

Returns
Number of processes still available for use.
Exceptions
nalpErrorIf there was a problem calling the NSLfunction, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLGetComputerID ( ) throws nalpError
inline

Gets the computer ID of the current system. See NSLGetComputerID().

Returns
A string containing the computerID of the system.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetCredentials ( String[]  creds) throws nalpError
inline

Get information from the last SetCredentials (or callback) call.

Parameters
credsAn array of strings that return the following values in order

lastRet a pointer to a 64 bit signed integer that will contain the last return value from a callback provided to NSLSetCredentials.

username contains the last username set with NSLSetCredentials. username must be cleared with a call to NSLFree.

inData the last data sent to the callback. inData must be cleared with a call to NSLFree.

outData the last data received from the callback. outData must be cleared with a call to NSLFree.

Returns
= 0 If the call succeeded
< 0 A negative error value is returned (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLGetDeactivationCertReq ( String  licenseNo) throws nalpError
inline

Generate a request for a deactivation certificate from the Nalpeiron server (ie offline deactivation). The resulting request can be emailed or otherwise sent to Nalpeiron. See NSLGetDeactivationCertReq().

Parameters
licenseNothe license number used to obtain the license.
Returns
A string containing the deactivation certificate request. NOTE the byte array used to hold the cert is allocated to 8192 bytes. This is large enough for most deactivation requests. However, you will need to monitor the size of your of your certificate and increase this size as needed. If you receive a -9015 "Java or JNI memory error" return from this function the most likely cause is a nslCert array that is too small.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetFeatureStatus ( String  featureName) throws nalpError
inline

Checks the current license for the status of featureName. See NSLGetFeatureStatus().

Parameters
featureNamea string containing the five (5) character feature code of the feature to be checked out.
Returns
An integer representing the status of the checked-out feature (FEATSTATUS)
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLGetHostName ( ) throws nalpError
inline

Get the name or IP address of the Nalpeiron server or daemon used for licensing. See NSLGetHostName().

Returns
A string containing the hostname or IP address of the Nalpeiron server used for licensing.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLGetLeaseExpDate ( ) throws nalpError
inline

Get the lease expiration date. See NSLGetLeaseExpDate().

Returns
Returns a string containing the expiration of the license as a time/date string (Wed Jul 17 19:59:12 2013, for example). If the license has expired the date will contain the system's current time.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetLeaseExpSec ( ) throws nalpError
inline

Get the lease expiration time in seconds. See NSLGetLeaseExpSec().

Returns
A integer containing the number of seconds remaining in the current lease. If the lease is expired the number of seconds remaining will be 0 (zero).
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
long com.nalpeiron.nalplibrary.NSL.callNSLGetLibraryOptions ( ) throws nalpError
inline

Retrieves the library stamp options for the current library. See NSLGetLibraryOptions().

Returns
An unsigned 64 bit integer containing the library options. (LIBOPTS)
Exceptions
nalpErrorIf there was a problem calling the NSLfunction, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetLicense ( String  licenseNo,
String  xmlRegInfo 
) throws nalpError
inline

Contacts the SOAP server for a new license or a license refresh. See NSLGetLicense()

Deprecated:
June 2020 This function is deprecated and will be removed from a future version of the NSL library. Use callNSLObtainLicense (callNSLObtainLicense) instead.
Parameters
licenseNoIf licenseNo is non-NULL that number is used in the attempt to retrieve a license. If the licenseNo is NULL, the function attempts to retrieve a trial license.
xmlRegInfoOptional registration information may be passed to the Nalpeiron server using the xmlRegInfo string. If there is no registration information, this pointer should be NULL.
Returns
The status of the retrieved license (License status values)
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLGetLicenseCode ( ) throws nalpError
inline

Retrieves the license code used with the current license. NOTE: a license code will only be present if one has already been assigned to the current license via NSLGetLicense, NSLImportCert, etc. See NSLGetLicenseCode().

Returns
String containing the current license code.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetLicenseStatus ( ) throws nalpError
inline

Retrieves the status of the current license. Negative values indicate an invalid license state. See NSLGetLicenseStatus().

Returns
An integer representing the status of the current license (see License status values)
Exceptions
nalpErrorIf there was a problem calling the NSLfunction, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetLicenseType ( ) throws nalpError
inline

Retrieves the license type for the current license. See NSLGetLicenseInfo().

Returns
An unsigned 32 bit integer representing the license type. (LICTYPE)
Exceptions
nalpErrorIf there was a problem calling the NSLfunction, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLGetMaintExpDate ( ) throws nalpError
inline

Get the expiration date of the maintanence period. See NSLGetMaintExpDate().

Returns
Returns a string containing the end maintanence date of the license as a time/date string (Wed Jul 17 19:59:12 2013, for example). If the license's maintanence date has passed the return will contain the system's current time.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetMaintExpSec ( ) throws nalpError
inline

Get the number of seconds remaining in the maintanence period. See NSLGetMaintExpSec().

Returns
A integer containing the number of seconds remaining in the current maintenance period. If the maintenance period has expired the number of seconds remaining will be 0 (zero).
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetMaxProcs ( ) throws nalpError
inline

If the number of concurrent processes was limited when the system's license was created, this function will return the maximum number of allowed processes.

A license may limit the number of simultaneous copies allowed to run on a specific computer. This limit is disabled by default and, if desired, must be enabled on the Nalpeiron server. The number of copies available is set to noProcs+1 and availProc is the number of copies still available for use. When an application instance is started and returns availProc=0, the number of instances exceeds the maximum allowed and this instance should be terminated.

When disabled, this fuction will always return zero (0) as noProcs and one (1) as the number of availProc. NOTE limiting the number of processes allowed on a machine ("Number of concurrent Processes" setting on server) is not affected by the "Concurrency Mode" setting. See NSLGetNumbAvailProc()

Returns
Maximum number of processes allowed
Exceptions
nalpErrorIf there was a problem calling the NSLfunction, this error will be thrown (Nalpeiron V10 error returns)
ArrayList<String> com.nalpeiron.nalplibrary.NSL.callNSLGetMsgByDate ( ) throws nalpError
inline

: Call to get a current messages. Available only on certain platforms.

Returns
0 on success.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLGetNewLicenseCode ( String  profile) throws nalpError
inline

: Call to get a new license. Available only on certain platforms.

Returns
0 on success.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetPoolInfo ( String  poolName) throws nalpError
inline

Get the number of pool elements checked out from the named pool. See NSLGetPoolInfo().

Parameters
poolNamea string containing the five (5) character pool code of the pool to be withdrawn from.
Returns
> 0 The number of elements from the pool currently held by the system.
< 0 The status of the pool.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetPoolMax ( String  poolName) throws nalpError
inline

Get the number of pool elements in the named pool. See NSLGetPoolMax().

Parameters
poolNamea string containing the five (5) character pool code of the pool to be withdrawn from.
Returns
> 0 The maximum number of elements present in the pool.
< 0 The status of the pool.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetPoolStatus ( String  poolName) throws nalpError
inline

Get the number of pool elements checked out from the named pool. See NSLGetPoolStatus().

Deprecated:
June 2017 This function is deprecated and will be removed from a future version of the NSL library. Use callNSLGetPoolInfo (callNSLGetPoolInfo) instead.
Parameters
poolNamea string containing the five (5) character pool code of the pool to be withdrawn from.
Returns
> 0 The number of elements from the pool currently held by the system.
< 0 The status of the pool.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLGetPreset ( int  messageNo) throws nalpError
inline

: Call to get a preset messages. Available only on certain platforms.

Returns
0 on success.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLGetRefreshExpDate ( ) throws nalpError
inline

Get the refresh date. Available only on certain platforms.

Returns
Returns a string containing the refresh date of the license as a time/date string (Wed Jul 17 19:59:12 2013, for example). If the license refresh date has passed the return will contain the system's current time.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetRefreshExpSec ( ) throws nalpError
inline

Get remaining seconds until refresh. Available only on certain platforms.

Returns
A integer containing the number of seconds remaining in the current refresh period. If the refresh period has expired the number of seconds remaining will be 0 (zero).
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLGetSubExpDate ( ) throws nalpError
inline

Get the end date of the subscription period. See NSLGetSubExpDate().

Returns
Returns a string containing the end subscription date of the license as a time/date string (Wed Jul 17 19:59:12 2013, for example). If the license's subscription date has passed the return will contain the system's current time.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetSubExpSec ( ) throws nalpError
inline

Get the seconds remaining in the subscription period. See NSLGetSubExpSec().

Returns
A integer containing the number of seconds remaining in the current subscription period. If the subscription period has expired the number of seconds remaining will be 0 (zero).
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetTimeStamp ( ) throws nalpError
inline

Retrieves the current time (seconds since epoch start) from the Nalpeiron daemon or server. See NSLGetTimeStamp().

Returns
An integer containing the current time in seconds since epoch start.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetTokenInfo ( String  tokenName) throws nalpError
inline

Get information about tokens checked out from the named pool. See NSLGetTokenInfo().

Parameters
tokenNamea string containing the five (5) character code of the token pool to be withdrawn from.
Returns
> 0 The number of elements from the tokens currently held by the system.
< 0 The status of the tokesn.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLGetTrialExpDate ( ) throws nalpError
inline

Get the date of the trial expiration. See NSLGetTrialExpDate().

Returns
Returns a string containing the end trial date of the license as a time/date string (Wed Jul 17 19:59:12 2013, for example). If the license's trial date has passed the return will contain the system's current time.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLGetTrialExpSec ( ) throws nalpError
inline

Get the number of seconds remaining in the trial period. See NSLGetTrialExpSec().

Returns
A integer containing the number of seconds remaining in the current trial period. If the trial period has expired the number of seconds remaining will be 0 (zero).
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLGetUDFValue ( String  UDFName) throws nalpError
inline

Retrieve the value of a UDF (AA). See callNSLGetUDFValue().

Parameters
UDFNamea string containing the five (5) character UDF code of the value to be accessed
Returns
A string containing the UDF value.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLGetVersion ( ) throws nalpError
inline

Gets the vewrsion of the NSL library being accessed. See NSLGetVersion()

Returns
A String containing the version of the Nalpeiron library
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLGetVMInfo ( ) throws nalpError
inline

Retrieves virtual machine information for the system. See NSLGetVMInfo().

Returns
A string descibing the type of machine: physical or virtual. If virtual the string attempts to describe the type of virtual machine. (LICTYPE)
Exceptions
nalpErrorIf there was a problem calling the NSLfunction, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLImportCertificate ( String  licenseNo,
String  cert 
) throws nalpError
inline

Imports a license from the given certificate. See NSLImportCertificate().

Parameters
licenseNothe license number associated with the given license certificate
certEither the certificate itself passed in as a NULL terminated string or the full path to a file containing the certificate.
Returns
The license status of the imported certificate.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLObtainLicense ( String  licenseNo,
String  xmlRegInfo,
String  specialID 
) throws nalpError
inline

Contacts the SOAP server for a new license or a license refresh. See NSLObtainLicense()

Parameters
licenseNoIf licenseNo is non-NULL that number is used in the attempt to retrieve a license. If the licenseNo is NULL, the function attempts to retrieve a trial license.
xmlRegInfoOptional registration information may be passed to the Nalpeiron server using the xmlRegInfo string. If there is no registration information, this pointer should be NULL.
specialIDoptional system identifier. If specified, Nalpeiron server will include this value inside an application agility field called $SpecialID which can be accessed by the calling program via NSLGetUDFValue (callNSLGetUDFValue). If this value has been specified before (ie in a previous call to callNSLObtainLicense, for instance) the same value must be specified when requesting the license in the future else the request will be rejected by the Nalpeiron server. Once set, the value may be cleared by returning the license.
Returns
The status of the retrieved license (License status values)
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLReadSecStore ( String  rawkey,
String  storename 
) throws nalpError
inline

Retrieve the value of a Secure Store. See callNSLReadSecStore().

Parameters
rawkeya NULL terminated, binary string containing no NULL values. The rawKey will be used to generate a suitable encryption key. This value should match the rawKey value passed to NSLWriteSecStore when the storage was created.
storenamea string containing the five (5) character secure store code of the value to be accessed
Returns
A string containing the Secure Store value.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLRegister ( String  licenseNo,
String  xmlRegInfo 
) throws nalpError
inline

: Call registration function. Available only on certain platforms.

Returns
0 on success, negative value on error
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLRemoteCallV ( String  rpcName,
String[]  varNames,
String[]  varValues 
) throws nalpError
inline

Call a remote proceedure on the Nalpeiron server.

Parameters
rpcNameThe name of the remote proceedure
varNamesan array of strings containing the names of the RPC's parameters. The order of the parameter names must match the order of the parameter values. That is, name1, name2, name3, must be in the same order as value1, value2, value3
varValuesan array of strings containing the values to be used for the RPC's parameters. The order of the parameter names must match the order of the parameter values. That is, name1, name2, name3, must be in the same order as value1, value2, value3
Returns
A string containing the rpcReturn value, if any.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.callNSLRequestActivationCert ( String  licenseNo,
String  xmlRegInfo,
String  specialID 
) throws nalpError
inline

Generate an request for a activation certificate from the Nalpeiron server (ie offline activation). The resulting request can be emailed or otherwise sent to Nalpeiron. See NSLRequestActivationCert (/ref NSLRequestActivationCert).

Parameters
licenseNothe license number to be used in creating the certificate request. If the licenseNo is NULL, an attempt for a trial license certificate will be made.
xmlRegInfoOptional registration information may be passed to the Nalpeiron server using the xmlRegInfo string. If there is no registration information, this pointer should be NULL.
specialIDOptional user supplied string. If present in an activation certificate request the Nalpeiron server will place the supplied value in a special application agility field call $SpecialID. This field can be queried using callNSLGetUDFValue (callNSLGetUDFValue) to access the value from the calling program.
Returns
A string containing the activation certificate request. NOTE the byte array used to hold the cert is allocated to 16384 bytes. This is large enough for most activation requests. However, you will need to monitor the size of your of your certificate and increase this size as needed. If you receive a -9015 "Java or JNI memory error" return from this function the most likely cause is a nslCert array that is too small.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLReturnFeature ( String  featureName,
String  licenseNo 
) throws nalpError
inline

Return one use of a "floating feature" to the Nalpeiron server or daemon. See NSLReturnFeature().

Parameters
featureNamea string containing the five (5) character feature code of the feature to be checked out.
licenseNothe license number of the current, valid system license
Returns
0 on success
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLReturnLicense ( String  licenseNo) throws nalpError
inline

Returns the current license to the Nalpeiron server. See NSLReturnLicense().

Parameters
licenseNoThe license code associated with the current license
Returns
The status of the license after the return attempt.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLReturnPool ( String  poolName,
String  licenseNo,
int  amt 
) throws nalpError
inline

Returns a specified number of elements to an element pool. See NSLReturnPool().

/**

Parameters
poolNamea string containing the five (5) character pool code of the pool to be withdrawn from.
licenseNothe license number of the current, valid system license
amtthe number of elements to withdraw from the pool
Returns
= 0 If the call succeeded
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLReturnTokens ( String  tokenName,
String  licenseNo,
int  amt 
) throws nalpError
inline

Returns the specified number of tokens from the local machine to the Nalpeiron server.

Parameters
tokenNamea string containing the five (5) character code of the token pool to be consumed from.
licenseNothe license number of the current, valid system license
amtthe number of elements to return.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLSetCredentials ( String  classname,
String  methname,
String  username,
String  password,
String  inData 
) throws nalpError
inline

Set username and password for future logins to the Nalpeiron licensing server or for a user provided authentication callback function.

The Nalpeiron library provides three forms of authentication. In the simplest form, the username and password are presented to NSLSetCredentials. Both are passed to Nalpeiron (the password is never stored or transmitted as plain text) for validation. If the Nalpeiron server validates them a license can be obtains via calls such as NSLGetLicense.

In a second method, in addition to the username a callback function is passed into NSLCredentials. When authentication is required (ie when NSLSetCredentials is called but also when functions such as NSLGetLicense and NSLGetActivationCertReq are called) the callback will be called from the library. The callback must have the following function prototype:

int64_t (*userAuth)(char *uname, char *pword, void *inData, char **authToken, uint32_t *outDataSize, void **outData);

where uname = username pword = password inData = arbitrary data passed to the callback via the library if inData was set via NSLSetCredentials. Can be NULL authToken = an authentication token that may be passed back to the library. It is unused in straight callback authentication. outData = arbitrary data that may be passed back to the library from the callback. It is available via NSLGetCredentials. outDataSize = the size in bytes of the outData

If the return from the callback is >= 0, the library will assume that authentication has suceeded. If the return is < 0, the library will assume that authentication has failed. The return value of the callback is available via NSLGetCredentials.

In the third method of authentication the callback provides not just a return value but also an authentication token. The authentication token is passed to Nalpeiron for all licensing requests and will be verified there before the licensing occurs. One method of using the authentication token would be to generate a random string for the token during the callback. Before returning this string to the library, Nalpeiron web services would be used to push to Nalpeiron.

NSLSetCredentials may only be used when

There is no valid license (ie license status <= 0) or May be be used to set the callback and inData when accessing a license file with cached credentials. That is, the license was not returned when the library was closed and so the license file contains a valid (license status > 0) license with cached ABL credentials.

Parameters
classnameif empty then autentication will take place at Nalpeiron. If non-empty then the user supplied callback with found in classname with methname will be used for authentication.
methnameif NULL then autentication will take place at Nalpeiron. If non-NULL then the pointer will be used as a user supplied callback with the form:

long function(String username, String password, String inData, ByteBuffer authToken, int[] outDataSize, ByteBuffer outData);

This function will be called to authenticate the username/password combination. The function will have the username, password, and data parameters passed to it exactly as the were passed to the NSLSetCredentials function. This means, for instance, that you could encrypt the password before passing it to NSLSetCredentials for security purposes (of course, that would mean, the userAuthenticator function would need to be able to use an encrypted password). The callback is called immediately (ie in NSLSetCredentials) and again whenever a call to NSLGetLicense is made.

Parameters
usernameeither a NULL terminated, UTF-8 encoded string containing a valid username for the Nalpeiron server OR a UTF-8 encoded string that will be passed to the userAuthenticator function. NOTE in the case that a userAuthenticator function is to be used neither the username nor the password are stored in the license file. This means that the NSLSetCredentials function should be called after any library initialization. The username size is limited to 4k (4096 bytes).
passworda NULL terminated, UTF-8 encoded string containing a valid password for the Nalpeiron server OR a UTF-8 encoded string that will be passed to the userAuthenticator function. In the case of the password to be used at Nalpeiron for authentication, the password is never recorded nor transmitted in plain text. If the password is to be passed to an authentication function (ie userAuthenticator != NULL), then the password is NOT stored in the license file. This means that the NSLSetCredentials function should be called after any library initialization. The password size is limited to 4k (4096 bytes).
inDataan optional bit of data that, if non-NULL, will be passed into the userAuthenticator function. A copy of this data is made and stored in memory by the library. Data is NOT stored on disk at any time which means it is lost when the library is closed. NOTE data is neither used nor stored if a callback is not specified. The maximum allowable size is 4k (4096 bytes).
Returns
= 0 If the call succeeded
< 0 A negative error value is returned (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLSetCredentialsSSO ( String  ssoToken,
String  inData 
) throws nalpError
inline

This function mirrors the functionality of NSLSetCredentials but uses a JWT (JSON Web Token) to gather the needed authentication information.

Parameters
ssoTokenA valid NULL terminated jwt presented as a string. The jwt will be validated before being used as an authentication source. The standard JWT validation method is used which will require access to the IDP for jwks information. A local IDP may be used.
inDataused at this time. Should be set to NULL by the caller.
Returns
= 0 If the call succeeded
< 0 A negative error value is returned (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLTestConnection ( ) throws nalpError
inline

: Tests the network connection to Nalpeiron. See NSLTestConnection().

Deprecated:
June 2018 This function is deprecated and will be removed from a future version of the NSL library. Use callNSLTestConnection2 instead (callNSLTestConnection2) instead.
Returns
0 on success
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLTestConnection2 ( long  connTO,
long  transTO 
) throws nalpError
inline

: Tests the network connection to Nalpeiron. See NSLTestConnection2().

Parameters
connTOif non-zero the number of milliseconds the library should wait for the initial connection to the Nalpeiron server to complete before timing out. If 0, the values passed into NalpLibOpen are used. This value overrides any connection timeout specified at library initialization.
transTOif non-zero the number of milliseconds the library should wait for the entire transaction (this includes the connection time above, name look-up time, transfer time, etc) to the Nalpeiron server to complete before timing out. If 0, the passed into NalpLibOpen are used. This value overrides any transaction timeout specified at library initialization.
Returns
0 on success
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLValidateLibrary ( int  custID,
int  prodID 
) throws nalpError
inline

Verifies that the shared library you are accessing is the library you stamped at Nalpeiron's website. It does this by checking the customerID and productID sent in against the stamped values. See NSLValidateLibrary(). Any negative return value, even if it is not a known error code, is cause to consider the library invalid.

Parameters
custIDa unsigned 32 bit integer containing your Nalpeiron customer ID.
prodIDa unsigned 32 bit integer containing your Nalpeiron product ID.
Returns
= 0(zero) is returned if the customerID/productID passed into the function match those from the library. A non-zero values indicates a validation failure.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
int com.nalpeiron.nalplibrary.NSL.callNSLWriteSecStore ( String  rawkey,
String  storename,
String  secstorevalue 
) throws nalpError
inline

Write the value to a Secure Store. See callNSLWriteSecStore().

Parameters
rawkeya NULL terminated, binary string containing no NULL values. The rawKey will be used to generate a suitable encryption key. This value should match the rawKey value passed to NSLWriteSecStore when the storage was created.
storenamea string containing the five (5) character secure store code of the value to be accessed
secstorevaluebinary string of length storeSize containing the information stored in storeName. The max size of the stored information is 4k. NOTE the contants of this value is treated as a binary string. If you wish a NULL terminator it must be included in the string when it is stored. storeValue should be freed with NSLFree
Returns
= 0(zero) is returned if the Secure Store write succeeded.
Exceptions
nalpErrorIf there was a problem calling the NSL function, this error will be thrown (Nalpeiron V10 error returns)
String com.nalpeiron.nalplibrary.NSL.NSLGetLicNo ( )
inline
void com.nalpeiron.nalplibrary.NSL.NSLSetLicNo ( String  licNo)
inline