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/events/internal/VSMessageReceiveEvent.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/events/internal/VSMessageReceiveEvent.java')
| -rw-r--r-- | sources/events/internal/VSMessageReceiveEvent.java | 84 |
1 files changed, 0 insertions, 84 deletions
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; - } -} |
