|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread org.log4jfugue.MessageReceiver
public class MessageReceiver
Listens for log messages to process. This is the class that does the string searches to determine that a particular message of interest has been seen. When this happens the count of the associated instrument is incremented. The message can arrive from a variety of sources such as a live feed or a replay of an existing log file. The actual source does not matter to this class. A recent change to this class has been to replace the native java string search with an MIT based BoyerMoorHorspool string search that is up to 10x faster.
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 | |
---|---|
MessageReceiver()
|
Method Summary | |
---|---|
java.util.Set<java.lang.String> |
getInstrumentList()
Let other classes, like the RhythmSoundBuilder get our list of instruments |
void |
run()
Build the music string to send to JFugue |
void |
setMessages(java.util.Properties messages)
Injected by Spring, after music is set. |
void |
setMusic(Music music)
Used by Spring DI to tell class what the main Music object is |
void |
setReader(java.io.Reader reader)
Used by Spring DI to tell class where to get the message Reader |
void |
setStatistics(org.log4jfugue.Statistics statistics)
|
void |
swapCounters()
There are two message accumulators, one is being added to and the other is being played from. |
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 MessageReceiver()
Method Detail |
---|
public void setReader(java.io.Reader reader)
reader
- public void setStatistics(org.log4jfugue.Statistics statistics)
public void setMusic(Music music)
music
- public void setMessages(java.util.Properties messages)
messages
- public java.util.Set<java.lang.String> getInstrumentList()
public void swapCounters()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |