org.jwall.web.audit.io
Interface AuditEventSource

All Known Implementing Classes:
AuditEventQueue, BufferedAuditEventSource, NetworkAuditEventSource, SSLNetworkAuditEventSource

public interface AuditEventSource

This interface defines the methods which all sources of AuditEvent-objects have to implement. Right now this is just like an iterator over AuditEvents.

Author:
Christian Bockermann <chris@jwall.org>

Method Summary
 boolean hasNext()
          This method returns true if there is at least one more event pending, so if hasNext returns true, the next call to nextEvent should neither fail nor throw an exception.
 AuditEvent nextEvent()
          Returns the next available AuditEvent.
 void setFilter(AuditEventFilter filter)
          This sets a filter on the source.
 

Method Detail

setFilter

void setFilter(AuditEventFilter filter)
This sets a filter on the source. A source should only return events that match this filter or all events, if no filter is set. To disable filtering filter can be set to null.

Parameters:
filter - The filter that determines the events which are returned.

nextEvent

AuditEvent nextEvent()
Returns the next available AuditEvent. If no event is available null is returned.

Returns:
The next event.

hasNext

boolean hasNext()
This method returns true if there is at least one more event pending, so if hasNext returns true, the next call to nextEvent should neither fail nor throw an exception.

Returns:
true iff there is another event available.