diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-12 21:19:36 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-12 21:19:36 +0300 |
| commit | 5c5f252d5c7a2bdfefd4fbe54a7ae64537a64874 (patch) | |
| tree | 1a4741441c7463cd3b5c97cca98fbfd1bc91519f /sources/protocols/implementations/VSPingPongProtocol.java | |
| parent | ea4f22311b639561856f37c8ac872af2cd9d55dd (diff) | |
Restructure project to use Maven exclusively and bump to v1.0.1-SNAPSHOT
- Remove legacy Ant build system (build.xml, sources/ directory)
- Migrate to Maven-only build with standard directory structure
- Add comprehensive Maven documentation and JAVA_HOME setup for Fedora
- Update pom.xml with exec plugin and bump version to 1.0.1-SNAPSHOT
- Add CLAUDE.md for development guidance
- Update README.md with detailed build/run/clean instructions
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'sources/protocols/implementations/VSPingPongProtocol.java')
| -rw-r--r-- | sources/protocols/implementations/VSPingPongProtocol.java | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/sources/protocols/implementations/VSPingPongProtocol.java b/sources/protocols/implementations/VSPingPongProtocol.java deleted file mode 100644 index b1f3d20..0000000 --- a/sources/protocols/implementations/VSPingPongProtocol.java +++ /dev/null @@ -1,110 +0,0 @@ -package protocols.implementations; - -import core.VSMessage; -import protocols.VSAbstractProtocol; - -/** - * The class VSPingPongProtocol, an implementation of the ping pong protocol. - * - * @author Paul C. Buetow - */ -public class VSPingPongProtocol extends VSAbstractProtocol { - /** The client counter. */ - private int clientCounter; - - /** The server counter. */ - private int serverCounter; - - /** - * Instantiates a new ping pong protocol. - */ - public VSPingPongProtocol() { - super(VSAbstractProtocol.HAS_ON_CLIENT_START); - setClassname(getClass().toString()); - } - - /* (non-Javadoc) - * @see events.VSAbstractProtocol#onClientInit() - */ - public void onClientInit() { - } - - /* (non-Javadoc) - * @see protocols.VSAbstractProtocol#onClientReset() - */ - public void onClientReset() { - clientCounter = 0; - } - - /* (non-Javadoc) - * @see protocols.VSAbstractProtocol#onClientStart() - */ - public void onClientStart() { - VSMessage message = new VSMessage(); - message.setBoolean("fromClient", true); - message.setInteger("counter", ++clientCounter); - super.sendMessage(message); - } - - /* (non-Javadoc) - * @see protocols.VSAbstractProtocol#onClientRecv(core.VSMessage) - */ - public void onClientRecv(VSMessage recvMessage) { - if (!recvMessage.getBoolean("fromServer")) - return; - - super.log("message: " + recvMessage.getInteger("counter")); - - VSMessage message = new VSMessage(); - message.setBoolean("fromClient", true); - message.setInteger("counter", ++clientCounter); - super.sendMessage(message); - } - - /* (non-Javadoc) - * @see protocols.VSAbstractProtocol#onClientSchedule() - */ - public void onClientSchedule() { - } - - /* (non-Javadoc) - * @see events.VSAbstractProtocol#onServerInit() - */ - public void onServerInit() { - } - - /* (non-Javadoc) - * @see protocols.VSAbstractProtocol#onServerReset() - */ - public void onServerReset() { - serverCounter = 0; - } - - /* (non-Javadoc) - * @see protocols.VSAbstractProtocol#onServerRecv(core.VSMessage) - */ - public void onServerRecv(VSMessage recvMessage) { - if (!recvMessage.getBoolean("fromClient")) - return; - - super.log("message: " + recvMessage.getInteger("counter")); - - VSMessage message = new VSMessage(); - message.setBoolean("fromServer", true); - message.setInteger("counter", ++serverCounter); - super.sendMessage(message); - } - - /* (non-Javadoc) - * @see protocols.VSAbstractProtocol#onServerSchedule() - */ - public void onServerSchedule() { - } - - /* (non-Javadoc) - * @see protocols.VSAbstractProtocol#toString() - */ - public String toString() { - return super.toString() + "; New message afterwards"; - } -} |
