Example: Generic Event Factory Interface
This interface is used for processing generic audit events. Other interfaces can be defined which extend this interface to process specific audit event groupings, such as security events, transaction events, or some other custom grouping.
Generic Event Factory Interface
/** * GenericEventFactory is the interface used to generate audit events. * This interface may be extended to generate application specific audit events. * * One or more GenericEventFactory implementations each with a unique name can be defined in the * security configuration and be used by WAS security auditing service. * @author IBM Corporation * @version WAS 7.0 * @since WAS 7.0 */ public interface GenericEventFactory { /** * The init method allows a GenericEventFactory implementation to * initialize its internal auditing configuration using the properties and context object. * * The properties and context objects are treated as read-only and must not be modified by the * GenericEventFactory implementation. * * @param A String object represents the name of this GenericEventFactory. * @param A Map properties object that contains the custom properties that can be defined in the * the admin console or by using wsadmin scripting tool. * @param A Map object that contains the context that includes cell name, node name, and server name. * @exception ProviderFailureException might occur if the audit factory does not initialize */ public void init(String name, Map properties, Map context) throws ProviderFailureException; /** * * The terminate method gracefully quiesces the event factory implementation. */ public void terminate(); /** * * The refresh method allows a GenericEventFactory implementation to * update its internal auditing configuration using the properties object. * * The properties object is treated as read-only and must not be modified by the * GenericEventFactory implementation. * * @param A Map object that contains the custom properties * @exception ProviderFailureException might occur if the factory does not refresh */ public void refresh(java.util.Map properties) throws ProviderFailureException; /** * * The getName method returns the name of this GenericEventFactory. * * @param None * @return a String object represents the name of the GenericEventFactory. */ public String getName(); /** * * The sendEvent method determines whether the specified audit event is generated by this * GenericEventFactory. * * @param a String object represents an audit event * @param a OutcomeType object represents the audit outcome value * @exception ProviderFailureException might occur if the audit factory does not initialize * @return a boolean success/failure * @exception ProviderFailureException might occur if the audit factory does not send the event. */ public boolean sendEvent(String auditEventType, OutcomeType auditOutcome) throws ProviderFailureException; * }
Related tasks
Set audit event factories for security auditing