+

Search Tips   |   Advanced Search

Example: Base Generic Emitter Interface

The Base Generic Emitter interface defines how audit events are emitted. Other interfaces can exist to extend this interface and to process specific audit events groupings, such as security events, transactional events, or some other custom grouping. Use this interface to create a custom implementation of the emitter.


Base Generic Emitter Interface

/** 
* This is the interface for the event emitter. Event sources use this interface 
* to send events to an event service. 
*  
*/ 
public interface BaseGenericEmitter { 
/** 
* Sends an event to the configured GenericEmitter implementation. 
* 
* @param event The event to be sent to the event service. 
* This value cannot be null. 
* @return The global instance ID of the event that was built. 
* @exception GenericEmitterException If an error occurs during emitter processing. 
* @exception IllegalArgumentException If the event parameter is null. 
*/ 
public String sendEvent(GenericEvent event) throws 
					GenericEventException; 
/** * Sends an array of events to the configured GenericEmitter implementation. 
* @param events The event array to be sent to the event service. 
* This value cannot be null. 
* @return The global instance IDs of the events that were built. 
* @exception GenericEmitterException If an error occurs during emitter processing. 
* @exception IllegalArgumentException If the events parameter is null. 
*/ 
public String[] sendEvents(GenericEvent events[]) throws 
					GenericEventException; 
/** 
* Causes the emitter to release all resources that are owned by this 
* object and its dependents. 
* Subsequent calls to this method have no effect. 
* 
* @throws GenericEmitterException If the emitter does release the 
* held resources. 
* resources. 
* @throws GenericEventException If any other error occurs when releasing resources. 
*/ 
public void close() throws 
					GenericEventException; 
}

  • Configure the default audit service providers for security auditing