Package org.jboss.as.protocol
Class GeneralTimeoutHandler
- java.lang.Object
-
- org.jboss.as.protocol.GeneralTimeoutHandler
-
- All Implemented Interfaces:
ProtocolTimeoutHandler
public class GeneralTimeoutHandler extends Object implements ProtocolTimeoutHandler
A general implementation ofProtocolTimeoutHandlerthat takes into account the time taken forRunnabletasks to be executed.- Author:
- Darran Lofthouse
-
-
Constructor Summary
Constructors Constructor Description GeneralTimeoutHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xnio.IoFuture.Statusawait(org.xnio.IoFuture<?> future, long timeoutMillis)Wait for the specified time on the suppliedIoFuture, taking into account that some of this time could actually not be related to the establishment of the connection but instead some local task such as user think time.voidsuspendAndExecute(Runnable runnable)
-
-
-
Method Detail
-
suspendAndExecute
public void suspendAndExecute(Runnable runnable)
-
await
public org.xnio.IoFuture.Status await(org.xnio.IoFuture<?> future, long timeoutMillis)Description copied from interface:ProtocolTimeoutHandlerWait for the specified time on the suppliedIoFuture, taking into account that some of this time could actually not be related to the establishment of the connection but instead some local task such as user think time.- Specified by:
awaitin interfaceProtocolTimeoutHandler- Parameters:
future- - TheIoFutureto wait on.timeoutMillis- - The configures timeout in milliseconds.- Returns:
- The
IoFuture.Statuswhen available or at the time the timeout is reached - whichever is soonest.
-
-