|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ejie.r01f.process.TimeoutController
Clase que implementa un timeout que se lanza unos cuantos segundos (basado en la clase TimeoutController de Jakarta commons).
Nested Class Summary | |
static class |
TimeoutController.TimeoutException
Signals that the task timed out. |
Method Summary | |
static void |
execute(java.lang.Runnable task,
long timeout)
Ejecuta la tarea en un nuevo deamon Thread y espera el tiempo especificado en el timeout. |
static void |
execute(java.lang.Thread task,
long timeout)
Ejecuta la tarea y espera los milisegundos especificados en timeout para devolver Si la tarea no retorna en el número de milisegundos especificado, el thread se interrumpe y se lanza una excepción El llamante debe sobrecarga el método Thread.interrupt() para hacer algo que mate el thread o bien utilice el método Thread.isInterrupted(); |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void execute(java.lang.Thread task, long timeout) throws TimeoutController.TimeoutException
TimeoutController.TimeoutException
- si se cumple el timeout y el thread no ha retornado.public static void execute(java.lang.Runnable task, long timeout) throws TimeoutController.TimeoutException
TimeoutException:
- si pasa el tiempo especificado y la tarea no ha retornado
TimeoutController.TimeoutException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |