The Lotus® Connections Event SPI allows third parties to consume event data generated by Lotus Connections.
With version 3, support was added for auditing and compliance. For more information about this support, see Auditing and Compliance enablement
The Event SPI is an important part of auditing and compliance enablement. By contributing Java™ code written to this SPI, independent applications can plug into the creation, deletion, and update of content within Lotus Connections, and in some cases influence the creation, deletion, or update of that content. There are various potential uses for the SPI, such as:
- Using events to audit or log the activity in Lotus Connections
- Using events to gather statistical information about activity in Lotus Connections
- Pushing content from Lotus Connections to other systems
What are events?
Events are collections of data generated when certain activities occur in the Lotus Connections product. Typically, events are generated for any activity that represents the creation, update, or deletion of content, changes in access control or membership, and other such activity. Generally, read activity does not result in the generation of events. Events contain a set of standard metadata, as well as optional data sets that may be present for certain event types. Every event can also contain arbitrary properties. In the SPI, an event is represented by a Java Event interface.
What is an event handler?
An event handler is a independently contributed piece of code written to the Event SPI. There are two types of event handlers:
Pre-event handlers are always invoked at a point at which the action the event represents has not yet been committed. As such, pre-event handlers are capable of modifying some event data. In Lotus Connections 3, pre-event handlers are only supported for certain moderation operations in certain applications. You should not expect any data modification made in a pre-event handler to be reflected in the system in all cases, or for all events to trigger these handlers. Pre-event handlers are always invoked synchronously, and therefore can directly impact the response times of the system.Post-event handler
Post-event handlers are invoked after an action that the event represents has been committed, and therefore represent the result of an action. Post-event handlers have access to the same data as pre-event handlers, but the data is immutable. Post-event handlers can be configured to be invoked either synchronously or asynchronously. Synchronously-invoked handlers can directly impact the response times of the system. In almost all cases, post-event handlers should be registered asynchronously.
The use of pre-event handlers and synchronous post-event handlers is limited to certain system functions for moderation. Not all events within the system will trigger these handlers. Asynchronous post-event handlers are capable of being triggered for any event generated by the system.
See Programming an event handler
for details about how to program an event handler. Documentation of the event handler SPI interfaces is available in the Event SPI Javadoc.
Event handler deployment and registration
Event handlers must be deployed to the Lotus Connections system, and also registered in the events-config.xml configuration file. See Deploying an event handler
for more details.
Programming an event handler
Event handlers are Java code that executes within the context of the Lotus Connections server. To write an event handler, you must implement the Event handler SPI interfaces. The Event handler SPI interfaces are contained in the lc.events.spi.jar file. More detailed information about the specific Event SPI interfaces referenced in this topic are contained in the Event SPI Javadoc.
Deploying an event handler
Deploy your event handler to the Lotus Connections server runtime.
Event SPI Javadoc
Refer to the Event SPI Javadoc for details about the event implementation.
Parent topic: Lotus Connections SPIs