示例:基本通用发射器接口
基本通用发射器接口定义如何发射审计事件。可能存在其他接口以扩展此接口及处理特定审计事件组,如安全性事件、事务事件或某些其他定制组。使用此接口创建发射器的定制实现。
基本通用发射器接口
/**
* 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;
}