From 5c5f252d5c7a2bdfefd4fbe54a7ae64537a64874 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 12 Jun 2025 21:19:36 +0300 Subject: Restructure project to use Maven exclusively and bump to v1.0.1-SNAPSHOT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- sources/events/internal/VSMessageReceiveEvent.java | 84 ---------------------- 1 file changed, 84 deletions(-) delete mode 100644 sources/events/internal/VSMessageReceiveEvent.java (limited to 'sources/events/internal/VSMessageReceiveEvent.java') diff --git a/sources/events/internal/VSMessageReceiveEvent.java b/sources/events/internal/VSMessageReceiveEvent.java deleted file mode 100644 index 51ae926..0000000 --- a/sources/events/internal/VSMessageReceiveEvent.java +++ /dev/null @@ -1,84 +0,0 @@ -package events.internal; - -import core.VSMessage; -import protocols.VSAbstractProtocol; -import serialize.VSNotSerializable; - -/** - * The class VSMessageReceiveEvent, this event is used if a process receives - * a message. - * - * @author Paul C. Buetow - */ -public class VSMessageReceiveEvent extends VSAbstractInternalEvent - implements VSNotSerializable { - - /** The message. */ - private VSMessage message; - - /** - * Instantiates a new message receive event. - * - * @param message the message - */ - public VSMessageReceiveEvent(VSMessage message) { - this.message = message; - } - - /* (non-Javadoc) - * @see events.VSAbstractEvent#onInit() - */ - public void onInit() { - setClassname(getClass().toString()); - } - - /* (non-Javadoc) - * @see events.VSAbstractEvent#onStart() - */ - public void onStart() { - boolean onlyRelevantMessages = process.getPrefs().getBoolean("sim.messages.relevant"); - - //String eventName = message.getName(); - String protocolClassname = message.getProtocolClassname(); - - if (onlyRelevantMessages && !isRelevantMessage()) - return; - - Object protocolObj = null; - - if (process.objectExists(protocolClassname)) - protocolObj = process.getObject(protocolClassname); - - process.updateLamportTime(message.getLamportTime()+1); - process.updateVectorTime(message.getVectorTime()); - - StringBuffer buffer = new StringBuffer(); - buffer.append(prefs.getString("lang.message.recv")); - buffer.append("; "); - buffer.append(message);; - log(buffer.toString()); - - if (protocolObj != null) - ((VSAbstractProtocol) protocolObj).onMessageRecvStart(message); - } - - /** - * Checks if the message delivering is relevant. - * - * @return true, if relevant - */ - public boolean isRelevantMessage() { - String protocolClassname = message.getProtocolClassname(); - Object protocolObj = null; - - if (process.objectExists(protocolClassname)) - protocolObj = process.getObject(protocolClassname); - else - return false; - - if (!((VSAbstractProtocol) protocolObj).isRelevantMessage(message)) - return false; - - return true; - } -} -- cgit v1.2.3