|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.UCL.xmiddle.framework.controller.Acknowledger
Acknowledger.java Acknowledger is a mechanism used by the networking module of xmiddle to make sure that information has been sent/received to/by another host. Using a specified timeout (which must have passed without receiving an acknowledgement) an Acknowledger will re-send the data to the remote host for a specified number of maximum times. Created: Fri Jul 20 13:04:50 2001
Field Summary | |
protected long |
maxtimes
The maximum number of times that the data will be sent if no acknowledgement is received. |
protected long |
timeout
The timeout (in milliseconds) before re-sending the data. |
Constructor Summary | |
Acknowledger(long timeout,
int maxtries)
Initialises the acknowledger |
Method Summary | |
abstract void |
abort()
Aborts the execution of the Acknowledger. |
abstract boolean |
match(java.lang.Object data)
If the given data matches the data that is expected by the acknowledger, then verify returns true. |
abstract boolean |
verify()
Starts sending the data to the remote host. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected long timeout
protected long maxtimes
Constructor Detail |
public Acknowledger(long timeout, int maxtries)
timeout
- time to wait before retryingMethod Detail |
public abstract boolean verify()
boolean
valuepublic abstract boolean match(java.lang.Object data)
verify
returns true. This
method is called when data is received by the Networking module
which are destined to an acknowledger.
data
- the data received which could be what the
Acknowledger expects.
data
match the ones expected or
false otherwisepublic abstract void abort()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |