summaryrefslogtreecommitdiff
path: root/sources/core/VSMessage.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-25 08:10:13 +0000
committerPaul Buetow <paul@buetow.org>2008-05-25 08:10:13 +0000
commitc015d586d22b69078b6da61858e5675793856b0b (patch)
treeefbc9881cf59363abef52a0beb5eedf9e81a224a /sources/core/VSMessage.java
parent62fe28f0b0b0c9ebde18a6dc33907889ff3aa21b (diff)
JAutoDoc :)
Diffstat (limited to 'sources/core/VSMessage.java')
-rw-r--r--sources/core/VSMessage.java76
1 files changed, 47 insertions, 29 deletions
diff --git a/sources/core/VSMessage.java b/sources/core/VSMessage.java
index 05c9e6a..a16d35b 100644
--- a/sources/core/VSMessage.java
+++ b/sources/core/VSMessage.java
@@ -1,45 +1,53 @@
+/*
+ * VS is (c) 2008 by Paul C. Buetow
+ * vs@dev.buetow.org
+ */
package core;
import core.time.*;
import events.*;
import prefs.VSPrefs;
-/** This class represents a message which is send from one process to another process in the simulation.
+// TODO: Auto-generated Javadoc
+/**
+ * This class represents a message which is send from one process to another process in the simulation.
*/
public class VSMessage extends VSPrefs {
- /** Each message belongs to a specific protocol. This variable defined the class name of the protocol being used.
- */
+
+ /** Each message belongs to a specific protocol. This variable defined the class name of the protocol being used. */
private String protocolClassname;
- /** The default application preferences.
- */
+
+ /** The default application preferences. */
private VSPrefs prefs;
- /** A reference to the process who sent this message.
- */
+
+ /** A reference to the process who sent this message. */
private VSProcess sendingProcess;
- /** The vector time of the sending process after sending. The receiver process will use this vector time in order to update the local vector time.
- */
+
+ /** The vector time of the sending process after sending. The receiver process will use this vector time in order to update the local vector time. */
private VSVectorTime vectorTime;
- /** The lamport time of the sending process after sending. The receiver process will use this lamport time in order to update the local vector time.
- */
+
+ /** The lamport time of the sending process after sending. The receiver process will use this lamport time in order to update the local vector time. */
private long lamportTime;
- /** Each message has its own unique ID. The ID will show up in the logging window of the simulator as well.
- */
+
+ /** Each message has its own unique ID. The ID will show up in the logging window of the simulator as well. */
private long messageID;
- /** This counter is used in order to generate unique message ID's.
- */
+
+ /** This counter is used in order to generate unique message ID's. */
private static long messageCounter;
- /** The constructor of the message.
+ /**
+ * The constructor of the message.
*
- * @param protocolClassname The classname of the protocol this message
- * belongs to.
+ * @param protocolClassname The classname of the protocol this message
+ * belongs to.
*/
public VSMessage(String protocolClassname) {
this.protocolClassname = protocolClassname;
this.messageID = ++messageCounter;
}
- /** Initialized the message.
+ /**
+ * Initialized the message.
*
* @param process The sending process of this message.
*/
@@ -50,7 +58,7 @@ public class VSMessage extends VSPrefs {
vectorTime = sendingProcess.getVectorTime().getCopy();
}
- /**
+ /**
* Getter method.
*
* @return The protocol name of the message.
@@ -59,7 +67,8 @@ public class VSMessage extends VSPrefs {
return VSRegisteredEvents.getName(getProtocolClassname());
}
- /** Getter method.
+ /**
+ * Getter method.
*
* @return The protocol classname of the message.
*/
@@ -67,7 +76,8 @@ public class VSMessage extends VSPrefs {
return protocolClassname;
}
- /** Getter method.
+ /**
+ * Getter method.
*
* @return The ID of the message.
*/
@@ -75,7 +85,8 @@ public class VSMessage extends VSPrefs {
return messageID;
}
- /** Getter method.
+ /**
+ * Getter method.
*
* @return The process which sent this message.
*/
@@ -83,7 +94,8 @@ public class VSMessage extends VSPrefs {
return sendingProcess;
}
- /** Getter method.
+ /**
+ * Getter method.
*
* @return The lamport time of the sending process.
*/
@@ -91,7 +103,8 @@ public class VSMessage extends VSPrefs {
return lamportTime;
}
- /** Getter method.
+ /**
+ * Getter method.
*
* @return The vector time of the sending process.
*/
@@ -99,7 +112,8 @@ public class VSMessage extends VSPrefs {
return vectorTime;
}
- /** String representation of the message object.
+ /**
+ * String representation of the message object.
*
* @return String representation of the message object.
*/
@@ -116,7 +130,8 @@ public class VSMessage extends VSPrefs {
return buffer.toString();
}
- /** Extended string representation of the message object.
+ /**
+ * Extended string representation of the message object.
*
* @return Extended string representation of the message object.
*/
@@ -124,16 +139,19 @@ public class VSMessage extends VSPrefs {
return toString() + "; " + super.toString();
}
- /** Compares two messages.
+ /**
+ * Compares two messages.
*
* @param message The message to compare with.
+ *
* @return true, if the messages have the same ID. Otherwise false.
*/
public boolean equals(VSMessage message) {
return messageID == message.getMessageID();
}
- /** For logging in the simulator's logging window!
+ /**
+ * For logging in the simulator's logging window!.
*
* @param message The message to logg.
*/