|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread eu.semaine.components.Component eu.semaine.components.dialogue.interpreters.UserPresenceInterpreter
public class UserPresenceInterpreter
Nested Class Summary |
---|
Nested classes/interfaces inherited from class eu.semaine.components.Component |
---|
Component.State |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_EXTERNAL_USERPRESENCE_THRESHOLD
|
static java.lang.String |
PROPERTY_FACE_END_THRESHOLD
|
static java.lang.String |
PROPERTY_FACE_START_THRESHOLD
|
static java.lang.String |
PROPERTY_SYSTEM_END_THRESHOLD
|
static java.lang.String |
PROPERTY_VOICE_END_THRESHOLD
|
static java.lang.String |
PROPERTY_VOICE_START_THRESHOLD
|
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 | |
---|---|
UserPresenceInterpreter()
|
Method Summary | |
---|---|
protected void |
act()
Proactive actions. |
protected long |
getFaceChangeTime(SEMAINEEmmaMessage m)
If the given message indicates the fact that a face status change has been detected, provide the time of that change, if possible. |
protected java.lang.String |
getFaceStatusChange(SEMAINEEmmaMessage m)
If the given message indicates the fact that a face status change has been detected, provide the type of that change. |
protected long |
getSystemSpeakingEventTime(SEMAINEXMLMessage callbackMessage)
|
long |
getThresholdFaceAppeared()
|
long |
getThresholdFaceDisappeared()
|
long |
getThresholdSystemStoppedSpeaking()
|
long |
getThresholdVoiceAppeared()
|
long |
getThresholdVoiceDisappeared()
|
protected long |
getVoiceChangeTime(SEMAINEEmmaMessage m)
If the given message indicates the fact that a face status change has been detected, provide the time of that change, if possible. |
protected java.lang.String |
getVoiceStatusChange(SEMAINEEmmaMessage m)
If the given message indicates the fact that a voice status change has been detected, provide the type of that change. |
protected boolean |
isExternalUserPresenceInForce()
Whether there is an externally specified user presence which has been set less than threshold time ago. |
protected boolean |
isFaceDetected(SEMAINEEmmaMessage m)
Determine whether the given message indicates the fact that a face has been detected. |
protected boolean |
isFaceDisappeared(SEMAINEEmmaMessage m)
Determine whether the given message indicates the fact that a face has just disappeared. |
protected boolean |
isFacePresent()
Determine whether the face is currently present, or presence is so recent that we still consider the face to be present. |
protected boolean |
isSystemSpeaking()
Determine whether the system is currently speaking, or stopped speaking so recently that we still consider the system to be speaking. |
protected boolean |
isSystemStartsSpeaking(SEMAINEXMLMessage callbackMessage)
|
protected boolean |
isSystemStopsSpeaking(SEMAINEXMLMessage callbackMessage)
|
protected boolean |
isUserPresent()
Determine based on the observed evidence (face, voice) whether the user is currently present, or presence is so recent that we still consider the user to be present. |
protected boolean |
isVoiceDetected(SEMAINEEmmaMessage m)
Determine whether the given message indicates the fact that a voice has been detected. |
protected boolean |
isVoiceDisappeared(SEMAINEEmmaMessage m)
Determine whether the given message indicates the fact that a voice has just disappeared. |
protected boolean |
isVoicePresent()
Determine whether the voice is currently present, or presence is so recent that we still consider the voice to be present. |
protected void |
react(SEMAINEMessage m)
Reactions to messages. |
protected void |
sendUserPresenceChange()
|
protected boolean |
updateUserPresence()
Update the internal state of the component reflecting the user presence, which can be obtained from isUserPresent() . |
Methods inherited from class eu.semaine.components.Component |
---|
customStartIO, exitRequested, getMeta, hasSystemJustBecomeReady, messageAvailableFrom, requestExit, run |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, 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 |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_VOICE_START_THRESHOLD
public static final java.lang.String PROPERTY_VOICE_END_THRESHOLD
public static final java.lang.String PROPERTY_FACE_START_THRESHOLD
public static final java.lang.String PROPERTY_FACE_END_THRESHOLD
public static final java.lang.String PROPERTY_SYSTEM_END_THRESHOLD
public static final java.lang.String PROPERTY_EXTERNAL_USERPRESENCE_THRESHOLD
Constructor Detail |
---|
public UserPresenceInterpreter() throws JMSException
componentName
-
JMSException
Method Detail |
---|
public long getThresholdVoiceAppeared()
public long getThresholdVoiceDisappeared()
public long getThresholdFaceAppeared()
public long getThresholdFaceDisappeared()
public long getThresholdSystemStoppedSpeaking()
protected boolean isFaceDetected(SEMAINEEmmaMessage m)
m
- an emma message which may or may not indicate face presence.
protected boolean isFaceDisappeared(SEMAINEEmmaMessage m)
m
- an emma message which may or may not indicate face presence.
protected java.lang.String getFaceStatusChange(SEMAINEEmmaMessage m)
m
- an emma message which may or may not indicate face status change.the
- type of status change to verify
protected long getFaceChangeTime(SEMAINEEmmaMessage m)
m
- an emma message which may or may not indicate face status change.
protected boolean isVoiceDetected(SEMAINEEmmaMessage m)
m
- an emma message which may or may not indicate voice presence.
protected boolean isVoiceDisappeared(SEMAINEEmmaMessage m)
m
- an emma message which may or may not indicate voice presence.
protected java.lang.String getVoiceStatusChange(SEMAINEEmmaMessage m)
m
- an emma message which may or may not indicate voice status change.the
- type of status change to verify
protected long getVoiceChangeTime(SEMAINEEmmaMessage m)
m
- an emma message which may or may not indicate face status change.
protected boolean isSystemStartsSpeaking(SEMAINEXMLMessage callbackMessage) throws MessageFormatException, java.lang.NullPointerException
MessageFormatException
java.lang.NullPointerException
protected boolean isSystemStopsSpeaking(SEMAINEXMLMessage callbackMessage) throws MessageFormatException, java.lang.NullPointerException
MessageFormatException
java.lang.NullPointerException
protected long getSystemSpeakingEventTime(SEMAINEXMLMessage callbackMessage) throws MessageFormatException, java.lang.NullPointerException
MessageFormatException
java.lang.NullPointerException
protected void react(SEMAINEMessage m) throws JMSException
Component
react
in class Component
JMSException
- if communication with the JMS server goes wrong.protected boolean isVoicePresent()
protected boolean isFacePresent()
protected boolean isSystemSpeaking()
protected boolean isUserPresent()
protected boolean isExternalUserPresenceInForce()
protected boolean updateUserPresence()
isUserPresent()
.
protected void act() throws JMSException
Component
Component.waitingTime
milliseconds if no messages arrive, and after every message processing.
This base implementation does nothing; subclasses should implement
suitable behaviour here.
act
in class Component
JMSException
- if communication with the JMS server goes wrong.protected void sendUserPresenceChange() throws JMSException
JMSException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |