|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectr01f.process.TimeOutController
public class TimeOutController
| Nested Class Summary | |
|---|---|
static class |
TimeOutController.TimeoutException
Signals that the task timed out. |
| Constructor Summary | |
|---|---|
private |
TimeOutController()
No instanciar métodos de esta clase. |
| 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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
private TimeOutController()
| Method Detail |
|---|
public static void execute(java.lang.Thread task,
long timeout)
throws TimeOutController.TimeoutException
task: - La tarea a ejecutartimeout: - El timeout a esperar a que el thread retorne. 0 significa esperar para siempre
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
task: - La tarea a ejecutartimeout: - El timeout en milisegundos. 0 significa esperar para siempre
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 | |||||||||