public class TimeoutResultListener<E> extends java.lang.Object implements IResultListener<E>, IFutureCommandListener
Modifier and Type | Field and Description |
---|---|
protected IExternalAccess |
exta
The external access.
|
protected IResultListener<E> |
listener
The delegation listener.
|
protected java.lang.Object |
message
The timeout message.
|
protected boolean |
notified
The timeout occurred flag.
|
protected boolean |
realtime
The realtime flag.
|
protected long |
timeout
The timeout.
|
protected java.lang.Object |
timer
The timer.
|
protected boolean |
undone
Flag if undone methods should be used.
|
Constructor and Description |
---|
TimeoutResultListener(long timeout,
IExternalAccess exta,
boolean realtime,
java.lang.Object message,
IResultListener<E> listener)
Create a new listener.
|
TimeoutResultListener(long timeout,
IExternalAccess exta,
IResultListener<E> listener)
Create a new listener.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancel the timeout.
|
void |
commandAvailable(java.lang.Object command)
Called when a command is available.
|
void |
exceptionOccurred(java.lang.Exception exception)
Called when an exception occurred.
|
protected void |
initTimer() |
void |
resultAvailable(E result)
Called when the result is available.
|
protected IResultListener<E> listener
protected IExternalAccess exta
protected boolean notified
protected java.lang.Object timer
protected long timeout
protected boolean realtime
protected java.lang.Object message
protected boolean undone
public TimeoutResultListener(long timeout, IExternalAccess exta, IResultListener<E> listener)
public TimeoutResultListener(long timeout, IExternalAccess exta, boolean realtime, java.lang.Object message, IResultListener<E> listener)
public void resultAvailable(E result)
resultAvailable
in interface IFunctionalResultListener<E>
result
- The result.public void exceptionOccurred(java.lang.Exception exception)
exceptionOccurred
in interface IFunctionalExceptionListener
exception
- The exception.public void cancel()
protected void initTimer()
public void commandAvailable(java.lang.Object command)
commandAvailable
in interface IFutureCommandListener