Implementing a custom SPI

You can customize how your auditing information is handled by writing a Java class to manage the data:

  1. Create a Java class that implements the com.sybase.ep.security.audit.AuditSPI interface.

  2. Set the value of auditSPI to the name of the Java class—see Table 15-1.

Enterprise Security provides the com.sybase.ep.security.audit.AuditImplBase abstract class, which implements the com.sybase.ep.security.audit.AuditSPI interface. The following code sample illustrates a valid auditing class that you can use:

import com.sybase.ep.security.audit.*;

public class MyAudit extends AuditImplBase
{
   protected void performAudit(String auditRecord)                               throws AuditException
   {
      System.out.println(auditRecord);
   }
}