|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
org.jwall.web.audit.io.BufferedAuditEventSource
public class BufferedAuditEventSource
This is an implementation of a buffered event-source. Events
are read in a separate thread an stored in memory until they
are fetched by the nextEvent method.
The buffer size is given at creation time.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
BufferedAuditEventSource(AuditEventReader evtReader)
|
|
BufferedAuditEventSource(AuditEventReader evtReader,
int bufSize)
This creates a buffered source that fetches events from the reader given as evtReader and stores up to
bufSize events in memory. |
|
| 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 |
run()
This method loops forever, waiting for new events to arrive. |
void |
setFilter(AuditEventFilter filter)
This sets a filter on the source. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BufferedAuditEventSource(AuditEventReader evtReader)
public BufferedAuditEventSource(AuditEventReader evtReader,
int bufSize)
evtReader and stores up to
bufSize events in memory. If the internal
event-queue is full, it will block.
evtReader - bufSize - | Method Detail |
|---|
public boolean hasNext()
AuditEventSourcehasNext returns true, the next call to nextEvent
should neither fail nor throw an exception.
hasNext in interface AuditEventSourcetrue iff there is another event available.AuditEventSource.hasNext()public AuditEvent nextEvent()
AuditEventSourcenull
is returned.
nextEvent in interface AuditEventSourceAuditEventSource.nextEvent()public void setFilter(AuditEventFilter filter)
AuditEventSourcenull.
setFilter in interface AuditEventSourcefilter - The filter that determines the events which are returned.AuditEventSource.setFilter(org.jwall.web.audit.AuditEventFilter)public void run()
run in interface java.lang.Runnablerun in class java.lang.ThreadThread.run()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||