|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
frog.plugin.spot.onspot.FilterManager
public class FilterManager
Manages all filtering on the SPOT. Multiple Filters can be active at
a time. The purpose of this thread is to apply all active filters to a given
acceleration sample, remove an sample that a filter has deemed unnecessary
and hands the resulting, presumably smaller, list of samples to the
ConnectionManager which will then send these samples to the host.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static Class[] |
availFilters
List of filters that can be instantiated and used by the FilterManager. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Fields inherited from interface frog.plugin.spot.Frog_Spot_Constants |
|---|
CORRUPT_DATA, END_OF_DATA, INT_CORRUPT_DATA, INT_END_OF_DATA, MSG_ACK, MSG_ADD_FILTER, MSG_ALIVE, MSG_DISCONNECT, MSG_DISCOVER, MSG_END_OF_DATA, MSG_ERROR, MSG_GESTURE, MSG_REMOVE_FILTERS, MSG_RESEND, MSG_SAMPLE_RATE, PORT_BCAST, PORT_MAX, PORT_REPLY, PORT_START, SPOT1, SPOT1_PORT, SPOT2, SPOT2_PORT, SPOT3, SPOT3_PORT, SPOT4, SPOT4_PORT, SPOT5, SPOT5_PORT, SPOT6, SPOT6_PORT, SPOT7, SPOT7_PORT, SPOT8, SPOT8_PORT, SPOTB1, SPOTB1_PORT, SPOTB2, SPOTB2_PORT, SPOTB3, SPOTB3_PORT, SPOTB4, SPOTB4_PORT |
| Constructor Summary | |
|---|---|
FilterManager(FrogSpot frog)
Creates the FilterManager with a permanent reference back to the FrogSpot for quick access to its facilities. |
|
| Method Summary | |
|---|---|
void |
addFilter(byte index,
String param)
Adds a new instance of a Filter to the list of active filters. |
void |
giveGesture(Queue gesture)
Used by the AccelManager to add a new set of accelerations to
the FilterManager's job queue. |
void |
kill()
Attempt to unconditionally stop all threads and release all resources. |
void |
removeFilters()
Clears all active filters in this FilterManager. |
void |
run()
Constantly loops through a job queue of acceleration data applying all active filters. |
| 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 |
| Field Detail |
|---|
public static final Class[] availFilters
Filters are written, they should be added to this
list. The index of a given class is used by MSG_ADD_FILTER in the
ConnectionManager to add additional filters to the
FilterManager's activeFilter list.
| Constructor Detail |
|---|
public FilterManager(FrogSpot frog)
FrogSpot for quick access to its facilities.
frog - reference to the FrogSpot object| Method Detail |
|---|
public void addFilter(byte index,
String param)
Filter to the list of active filters.
A new filter is added by its index on the array of availFilters and a
given parameter String to dictate the Filter's behavior.
index - position of this filter in the availFilters arrayparam - a comma separated string of options for the Filterpublic void giveGesture(Queue gesture)
AccelManager to add a new set of accelerations to
the FilterManager's job queue. The AccelManager hands this queue over
before the user is even done with the gesture so processing can take
place as the gesture is being made.
gesture - the gesture (currently in progress) to be filteredpublic void kill()
Killable
kill in interface Killablepublic void removeFilters()
public void run()
run in interface Runnablerun in class Thread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||