SyncListener
Interface that provides an entry point that receives events sent from the server during synchronization. Any class implementing a SyncListener interface should also implement the SyncEvent event method.
See the onEventReceived section.
Synchronization Events
The synchronization events are objects that the SyncListener implementation receives during the synchronization process (see the SyncEvent section). Each event consists of the parameters that are passed from the server.
Only events that have been subscribed are sent to the SyncListener implementation.
The information that the SyncListener implementation can subscribe to and its parameters are the following events:
-
Event ID ACTION_RUNTIME_PARAM_VALUE_EVENT_STATUS, and
-
Event ID ACTION_RUNTIME_PARAM_VALUE_EVENT_APPLICATION, as described next.
Event ID ACTION_RUNTIME_PARAM_VALUE_EVENT_STATUS
Value: 90001
A localized security module operation-level event.
Parameters:
-
ID: CCMConstants.SYNC_EVENT_PARAM_MESSAGE
-
Type: Parameter.TYPE_STRING
-
Encoding: Parameter.ENCODING_NONE
-
Value: Description of the low-level device operation. The messages are based on the device profile leveraged in the synchronization.
-
-
ID: CCMConstants.SYNC_EVENT_PARAM_PERCENT
-
Type: Parameter.TYPE_INTEGER
-
Encoding: Parameter.ENCODING_NONE
-
Value: The percentage completion of the synchronization.
-
-
ID: CCMConstants.SYNC_EVENT_PARAM_LEVEL
-
Type: Parameter.TYPE_STRING
-
Encoding: Parameter.ENCODING_NONE
-
Value: The message level. Possible values are:
-
info—normal operation message
-
warn—a warning or ignorable error
-
error—an error fatal to the synchronization
-
Event ID ACTION_RUNTIME_PARAM_VALUE_EVENT_APPLICATION
Value: 90002
An application-level event that describes credential transactions that are executed on behalf of the application. The create/recover statuses are generated prior to the call to the credential provider.
The commit/failed statuses occur after a successful commit or after there is an abort of a credential transaction respectively.
Parameters:
-
CCMConstants.SYNC_EVENT_PARAM_APP_NAME
-
Type: String
-
Encoding: NONE
-
Value: The name of the high-level application with which the credential is associated (for example, PKI1, PKI2, or SKI1)
-
-
CCMConstants.SYNC_EVENT_PARAM_CRED_TYPE
-
Type: String
-
Encoding: NONE
-
Value: The type of credential (this should be the credential type as indicated by the credential provider)
-
-
CCMConstants.SYNC_EVENT_PARAM_STATUS
-
Type: String
-
Encoding: NONE
-
Value: Description of the status of the application action performed. Possible values are:
-
create
-
recover
-
commit
-
failed
-
-
Internationalization
The CCM API uses a resource bundling mechanism to support internationalization and localization. This mechanism can be used to customize the SyncListener. Internationalized strings stored in files are used in the event and these are displayed by the user interface in the ActivID CMS Operator Portal.
For Java
A single file (statusMessages.properties) located in the package (com.activcard.cms.service.tcd.client.event), is used for localizing status events returned to the SyncListener. There are other message files used purely for localizing errors on the server (and possibly in the client).
To support a new language, create a file that contains the corresponding messages in the new language and name that file with the following title:
statusMessages_XX.properties
Where the XX in the file name defines the language code. For example, to add French language messages, you can name the file:
statusMessages_fr.properties
Locate a list of language codes in the last column of the table on the following website:
http://www.loc.gov/standards/iso639-2/php/English_list.php
Unicode characters within the messages listed in this file must be encoded using the \uXXYY escape sequence, where XX and YY are the hexadecimal representation of the two bytes that specify the character.
For C++:
To localize the status events returned to the SyncListener, edit the aiCCMStatusMessages.ini file.
In this file, the set of messages in each language is stored in an .ini section that is defined by a language ID.
For example, if there are any French language messages, they would be in a section labeled [40c]. The list of language IDs can be found at the following website, which provides a table of locale identifier constants and strings: http://msdn.microsoft.com/en-us/library/dd318693.aspx