AIMSEventListener
To develop an event notification plug-in, you can take either of the following actions:
-
Subclass the com.activcard.aims.event.AIMSEventAdapter abstract class
or
-
Implement all com.activcard.aims.event.AIMSEventListener interface methods
The com.activcard.aims.event.AIMSEventListener interface is declared in the aims-spi.jar file, which is located in the cms_dir\cms_portal\WEB-INF\lib folder, and where cms_dir is the directory in which ActivID CMS is installed.
The AIMSEventListener interface defines the following methods:
-
void init()
-
ConfigurationTemplate getConfigurationTemplate(), which retrieves the implementation-specific input requirements of the implementing class as expressed by the ConfigurationTemplate. This method is called before calling typical initialization methods.
-
String getInterfaceVersion(), which returns the version of the interface this plug-in implements. Implementations should always return the INTERFACE_VERSION constant of this interface.
-
String getVersion(), which returns the SPI A Service Provider Interface (SPI) consists of a set of constant definitions and method declarations without implementations and intended to be called or used in a pre-determined generic manner with a set of outputs that meet pre-determined abstract rules and expectations. version.
-
void onAuthenticationEventReceived(AIMSEvent), which processes an authentication event.
-
void onCredentialEventReceived(AIMSEvent), which processes a credential event.
-
void onDeviceEventReceived(AIMSEvent), which processes a device event.
-
void onEventReceived(AIMSEvent), which processes an event.
-
void onRequestEventReceived(AIMSEvent), which processes a request event.
-
void onSetParams(Hashtable), which initializes plug-ins with some optional information.
-
void onUserEventReceived(AIMSEvent), which processes a user event.
-
void setConfiguration(Configuration configuration), which sets the Configuration resulting from a prior call to the method, getConfigurationTemplate(). The Configuration is a completed form of the previously retrieved ConfigurationTemplate. This method is called before calling the typical initialization methods.
See the Javadoc that accompanies this release, which provides all of the details related to each of these methods.
Initializing the init() Plug-In
void init()
The ActivID CMS server calls the init( ) method to initialize the plug-in. By the time that ActivID CMS calls this method, all of the parameters have already been resolved (the values coming from LDAP and from the user have already been collected).
Returns:
None
AIMSEventListener Exception Management
The AIMSEventListener interface specifies that the following methods may throw AIMSEventListenerFatalException and AIMSEventListenerWarningException instances:
-
void onAuthenticationEventReceived(AIMSEvent)
-
void onCredentialEventReceived(AIMSEvent)
-
void onDeviceEventReceived(AIMSEvent)
-
void onEventReceived(AIMSEvent)
-
void onRequestEventReceived(AIMSEvent)
-
void onUserEventReceived(AIMSEvent)
AIMSEventListenerFatalException
An AIMSEventListenerFatalException object is thrown when an error occurs in the plug-in and when this error must stop the operation that ActivID CMS is currently performing. Fatal exceptions are supported for all events and generate an audit event with an associated error severity level in the audit trail.
When a fatal error occurs, it is logged into the ActivID CMS log files and is added to the audit trail (with the audit severity level listed as ERROR). However, process interruption only occurs for events generated during issuance.
The AIMSEventListenerFatalException class extends the Java Exception class.
AIMSEventListenerWarningException
An AIMSEventListenerWarningException object is thrown when an error occurs in the plug-in and when this error does not require ActivID CMS to stop the current operation.
When this type of error occurs, it is logged into the ActivID CMS log files and added to the audit trail (with the audit severity level listed as WARNING).
The AIMSEventListenerWarningException class extends the Java Exception class.