public List<SecurityAuditEvent> getEvents(String username, Integer skipEvents, Integer numEvents, Date startTime, Date endTime) throws AuditWriteOnlyException {
        if (provider.isWriteOnly()) {
            throw new AuditWriteOnlyException();
        }
        return provider.getEvents(username, skipEvents, numEvents, startTime, endTime);
    }
Retrieves security events that have occurred, filtered by the parameters passed.
The events will be in order of most recent to least recent.

Any parameters that are left null are to be ignored.  In other words, if username is null,
then no specific username is being searched for.

@param username Username of user to look up.  Can be null for no username filtering.
@param skipEvents Number of events to skip past (typically for paging).  Can be null for first page.
@param numEvents Number of events to retrieve.  Can be null for "all" events.
@param startTime Oldest date of range of events to retrieve.  Can be null for forever.
@param endTime Most recent date of range of events to retrieve.  Can be null for "now".
@return Array of security events.
@throws AuditWriteOnlyException if provider can not be read from.
xmppserver/src/main/java/org/jivesoftware/openfire/security/SecurityAuditManager.java