diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-25 08:10:13 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-25 08:10:13 +0000 |
| commit | c015d586d22b69078b6da61858e5675793856b0b (patch) | |
| tree | efbc9881cf59363abef52a0beb5eedf9e81a224a /sources/protocols/implementations/ExternalTimeSyncProtocol.java | |
| parent | 62fe28f0b0b0c9ebde18a6dc33907889ff3aa21b (diff) | |
JAutoDoc :)
Diffstat (limited to 'sources/protocols/implementations/ExternalTimeSyncProtocol.java')
| -rw-r--r-- | sources/protocols/implementations/ExternalTimeSyncProtocol.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sources/protocols/implementations/ExternalTimeSyncProtocol.java b/sources/protocols/implementations/ExternalTimeSyncProtocol.java index 5a55d89..63edcaf 100644 --- a/sources/protocols/implementations/ExternalTimeSyncProtocol.java +++ b/sources/protocols/implementations/ExternalTimeSyncProtocol.java @@ -1,22 +1,46 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package protocols.implementations; import core.VSMessage; import protocols.VSProtocol; +// TODO: Auto-generated Javadoc +/** + * The Class ExternalTimeSyncProtocol. + */ public class ExternalTimeSyncProtocol extends VSProtocol { + + /** The request time. */ private long requestTime; + + /** The waiting for response. */ private boolean waitingForResponse; + /** + * Instantiates a new external time sync protocol. + */ public ExternalTimeSyncProtocol() { setClassname(getClass().toString()); } + /* (non-Javadoc) + * @see events.VSEvent#onInit() + */ protected void onInit() { } + /* (non-Javadoc) + * @see protocols.VSProtocol#onClientReset() + */ protected void onClientReset() { } + /* (non-Javadoc) + * @see protocols.VSProtocol#onClientStart() + */ protected void onClientStart() { requestTime = process.getTime(); waitingForResponse = true; @@ -27,6 +51,9 @@ public class ExternalTimeSyncProtocol extends VSProtocol { sendMessage(message); } + /* (non-Javadoc) + * @see protocols.VSProtocol#onClientRecv(core.VSMessage) + */ protected void onClientRecv(VSMessage recvMessage) { if (!recvMessage.getBoolean("isServerResponse")) return; @@ -45,9 +72,15 @@ public class ExternalTimeSyncProtocol extends VSProtocol { process.setTime(newTime); } + /* (non-Javadoc) + * @see protocols.VSProtocol#onServerReset() + */ protected void onServerReset() { } + /* (non-Javadoc) + * @see protocols.VSProtocol#onServerRecv(core.VSMessage) + */ protected void onServerRecv(VSMessage recvMessage) { if (!recvMessage.getBoolean("isClientRequest")) return; @@ -59,6 +92,9 @@ public class ExternalTimeSyncProtocol extends VSProtocol { sendMessage(message); } + /* (non-Javadoc) + * @see protocols.VSProtocol#toString() + */ public String toString() { return super.toString(); //+ "; " + prefs.getString("lang.requesttime") + ": " + requestTime; } |
