hmi.environment.semaine
Class SemaineXuukReader

java.lang.Object
  extended by java.lang.Thread
      extended by eu.semaine.components.Component
          extended by hmi.environment.semaine.SemaineXuukReader
All Implemented Interfaces:
eu.semaine.jms.SEMAINEMessageAvailableListener, XuukReader, Runnable

public class SemaineXuukReader
extends eu.semaine.components.Component
implements XuukReader

DOES NOT NOT NOT READ AND PROCESS THE EYE INFO !!!!! singleton -- i.e. one of these per JVM; using static getSemaineXuukReader you get the instance.

Author:
Dennis Reidsma

Nested Class Summary
 
Nested classes/interfaces inherited from class eu.semaine.components.Component
eu.semaine.components.Component.State
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.UncaughtExceptionHandler
 
Field Summary
private  HashMap<Integer,EyePair> eyes
           
private  ArrayList<XuukListener> eyesAppearanceListeners
           
private  ArrayList<XuukListener> eyesPositionListeners
           
private  ArrayList<XuukListener> faceAppearanceListeners
           
private  ArrayList<XuukListener> facePositionListeners
           
private  HashMap<Integer,Face> faces
           
private static org.slf4j.Logger logger
           
private static SemaineXuukReader singleton
           
 
Fields inherited from class eu.semaine.components.Component
inputWaiting, isInput, isOutput, log, meta, receivers, senders, state, waitingTime
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SemaineXuukReader()
           
 
Method Summary
 void addListener(XuukListener listener, boolean faceAppearances, boolean eyesAppearances, boolean facePositions, boolean eyesPositions)
          Used to add new interested Listeners.
 void customStartIO()
           
static SemaineXuukReader getSemaineXuukReader()
           
protected  void react(eu.semaine.jms.message.SEMAINEMessage m)
           
 
Methods inherited from class eu.semaine.components.Component
act, exitRequested, messageAvailableFrom, requestExit, run
 
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

logger

private static org.slf4j.Logger logger

faces

private HashMap<Integer,Face> faces

eyes

private HashMap<Integer,EyePair> eyes

faceAppearanceListeners

private ArrayList<XuukListener> faceAppearanceListeners

eyesAppearanceListeners

private ArrayList<XuukListener> eyesAppearanceListeners

facePositionListeners

private ArrayList<XuukListener> facePositionListeners

eyesPositionListeners

private ArrayList<XuukListener> eyesPositionListeners

singleton

private static SemaineXuukReader singleton
Constructor Detail

SemaineXuukReader

public SemaineXuukReader()
                  throws javax.jms.JMSException
Throws:
javax.jms.JMSException
Method Detail

getSemaineXuukReader

public static SemaineXuukReader getSemaineXuukReader()

customStartIO

public void customStartIO()
                   throws Exception
Overrides:
customStartIO in class eu.semaine.components.Component
Throws:
Exception

react

protected void react(eu.semaine.jms.message.SEMAINEMessage m)
              throws eu.semaine.exceptions.MessageFormatException
Overrides:
react in class eu.semaine.components.Component
Throws:
eu.semaine.exceptions.MessageFormatException

addListener

public void addListener(XuukListener listener,
                        boolean faceAppearances,
                        boolean eyesAppearances,
                        boolean facePositions,
                        boolean eyesPositions)
Used to add new interested Listeners. The booleans are used to indicate what kind of events the listener wants to receive.

Specified by:
addListener in interface XuukReader
Parameters:
listener - the listener to add
faceAppearances - set this to 'true' to receive events about the appearances and disappearances of the face
eyesAppearances - set this to 'true' to receive events about the appearances and disappearances of the eyes
facePositions - set this to 'true' to receive events about positions of the detected faces
eyesPositions - set this to 'true' to receive events about positions of the detected eyes