From c015d586d22b69078b6da61858e5675793856b0b Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 25 May 2008 08:10:13 +0000 Subject: JAutoDoc :) --- .../implementations/PingPongProtocol.java | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'sources/protocols/implementations/PingPongProtocol.java') diff --git a/sources/protocols/implementations/PingPongProtocol.java b/sources/protocols/implementations/PingPongProtocol.java index a2886f9..5df152f 100644 --- a/sources/protocols/implementations/PingPongProtocol.java +++ b/sources/protocols/implementations/PingPongProtocol.java @@ -1,23 +1,47 @@ +/* + * 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 PingPongProtocol. + */ public class PingPongProtocol extends VSProtocol { + + /** The client counter. */ private int clientCounter; + + /** The server counter. */ private int serverCounter; + /** + * Instantiates a new ping pong protocol. + */ public PingPongProtocol() { setClassname(getClass().toString()); } + /* (non-Javadoc) + * @see events.VSEvent#onInit() + */ protected void onInit() { } + /* (non-Javadoc) + * @see protocols.VSProtocol#onClientReset() + */ protected void onClientReset() { clientCounter = 0; } + /* (non-Javadoc) + * @see protocols.VSProtocol#onClientStart() + */ protected void onClientStart() { VSMessage message = new VSMessage(getClassname()); message.setBoolean("fromClient", true); @@ -25,6 +49,9 @@ public class PingPongProtocol extends VSProtocol { sendMessage(message); } + /* (non-Javadoc) + * @see protocols.VSProtocol#onClientRecv(core.VSMessage) + */ protected void onClientRecv(VSMessage recvMessage) { if (!recvMessage.getBoolean("fromServer")) return; @@ -37,10 +64,16 @@ public class PingPongProtocol extends VSProtocol { sendMessage(message); } + /* (non-Javadoc) + * @see protocols.VSProtocol#onServerReset() + */ protected void onServerReset() { serverCounter = 0; } + /* (non-Javadoc) + * @see protocols.VSProtocol#onServerRecv(core.VSMessage) + */ protected void onServerRecv(VSMessage recvMessage) { if (!recvMessage.getBoolean("fromClient")) return; @@ -53,6 +86,9 @@ public class PingPongProtocol extends VSProtocol { sendMessage(message); } + /* (non-Javadoc) + * @see protocols.VSProtocol#toString() + */ public String toString() { return super.toString(); } -- cgit v1.2.3