synchronize

Executes all pending requests for the security module (device in the reader). If no actions are pending, no security module content action results. This method supports the optional runtime parameter (LOCK) with values of true or false.

When set to true, this triggers GlobalPlatform locking at the end of synchronization. If a “synchronize” is performed with no pending actions and LOCK=true is supplied to the synchronization, this locks the security module with no other effect on the device or its lifecycle state. If no actions are pending and LOCK=false, no security module content action results.

For Java:

Copy
boolean synchronize(String platformClass, Parameter[] accessParameters, Parameter[] runtimeParameters) 
throws NoSuchSecurityModuleException, SyncCancelledException, SyncException, SessionException, 
LocalizedRemoteException;

For C++:

Copy
bool synchronize(TString platformClass, ParameterVector accessParameters, ParameterVector*runtimeParameters);

Parameters:

  • platformClass—Class of the security module platform (smart card, TPM, or USB). The supported option is:

  • PLATFORM_CLASS_SMARTCARD

  • accessParameters—Parameters required to access the security module.

Supported options for the PLATFORM_CLASS_SMARTCARD platform class include one of the following:

  • ACCESS_PARAM_SMARTCARD_READER—the name of the reader in which the security module is inserted

  • ACCESS_PARAM_SMARTCARD_PIN—the PIN associated with the device

  • runtimeParameters—Runtime parameters for the synchronization.

List of runtime parameters:

  • ACTION_RUNTIME_PARAM_PIN— device PIN used for ISSUANCE, PRODUCE and PINUNLOCK action type

  • ACTION_RUNTIME_PARAM_LOCK— device is locked at the end of synchronization if set to TRUE

  • ACTION_RUNTIME_ACTIONID—action identifier used to target a specific action (may be needed for wallets with multiple devices)

Returns:

A value of true if synchronization was performed; a value of false if nothing was found to synchronize.

Exceptions:

  • NoSuchSecurityModuleException— if the specified security module does not exist.

  • SyncCancelledException— if the synchronization is cancelled by another thread.

  • SyncException— if an internal implementation level failure.

  • SessionException— if there is no valid session (such as session not opened or timed out).

  • LocalizedRemoteException— (thrown by the Web service layer) only when the most severe, unexpected, SOAP-level failures occur.

  • NotSyncableStateException— if the discovered security module is not in a valid state for synchronization.