|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object au.com.terabit.jproactor.OpTimer
public final class OpTimer
This class provides implementation of the timer operations.
$Revision$ $Date$
Nested Class Summary | |
---|---|
static class |
OpTimer.State
Timer state values |
Field Summary | |
---|---|
long |
m_expiryTime
Timer expiration time: number of milliseconds since 1 Jan 1970 00:00:00 GMT |
Constructor Summary | |
---|---|
OpTimer(long delay,
AsynchTimerHandler handler)
|
Method Summary | |
---|---|
java.lang.Object |
attach(java.lang.Object value)
Attaches an object to this operation. |
java.lang.Object |
attachment()
Returns currently attached object. |
void |
cancel()
Cancels this timer |
boolean |
isCancelled()
|
void |
onComplete()
Called when timer has expired - notifies protocol instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final long m_expiryTime
Constructor Detail |
---|
public OpTimer(long delay, AsynchTimerHandler handler)
handler
- the timer notification receiverdelay
- time delay from now when to expire the timer, millisecondsMethod Detail |
---|
public void onComplete()
IOOperation.onComplete()
public void cancel()
public boolean isCancelled()
public final java.lang.Object attach(java.lang.Object value)
Attachments can be useful when executig onComplete()
operation
and be retrieved using attachment()
operation.
value
- object to be attached, can be a null value
public final java.lang.Object attachment()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |