|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.malai.interaction.Transition
org.malai.interaction.TimeoutTransition
public class TimeoutTransition
This transition defines a timeout: when the user does nothing during a given duration,
the timeout transition is executed.
This file is part of Malai.
Copyright (c) 2009-2012 Arnaud BLOUIN
Malai is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.
Malai is distributed without any warranty; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
11/01/2011
Nested Class Summary | |
---|---|
(package private) class |
TimeoutTransition.TimeoutRunnable
A TimeoutRunnable defines the executable part of the thread which is thrown when the chronometre of the transition is launched. |
Field Summary | |
---|---|
protected int |
timeout
The timeout in ms. |
private java.lang.Thread |
timeoutThread
The current thread in progress. |
Fields inherited from class org.malai.interaction.Transition |
---|
hid, inputState, outputState |
Constructor Summary | |
---|---|
TimeoutTransition(SourceableState inputState,
TargetableState outputState,
int timeout)
Creates the transition. |
Method Summary | |
---|---|
int |
getTimeout()
|
void |
setTimeout(int timeout)
|
void |
startTimeout()
Launches the chronometre (and its thread). |
void |
stopTimeout()
Stops the chronometre (and its thread). |
Methods inherited from class org.malai.interaction.Transition |
---|
action, getHid, getInputState, getOutputState, isGuardRespected, setHid, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int timeout
private java.lang.Thread timeoutThread
Constructor Detail |
---|
public TimeoutTransition(SourceableState inputState, TargetableState outputState, int timeout)
inputState
- The source state of the transition.outputState
- The target state of the transition.timeout
- The timeout in ms. Must be greater than 0.
java.lang.IllegalArgumentException
- If one of the given parameters is null or not valid.Method Detail |
---|
public void startTimeout()
public void stopTimeout()
public void setTimeout(int timeout)
timeout
- The timeout in ms. Must be greater than 0.public int getTimeout()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |