diff --git a/src/main/java/dslab/client/MessageClient.java b/src/main/java/dslab/client/MessageClient.java index f6ab5d8..e8fe008 100644 --- a/src/main/java/dslab/client/MessageClient.java +++ b/src/main/java/dslab/client/MessageClient.java @@ -323,6 +323,14 @@ public class MessageClient implements IMessageClient, Runnable { return (Base64.getEncoder().encodeToString(cipherTextChallenge)); } + /** + * Queries the MailboxServer for messages sent to a user. + *
+ * Sends the 'list' command to the MailboxServer. From the output + * the IDs of the messages are extracted. For every ID, the 'show' + * command is sent to the MailboxServer and then printed to the + * shell. + */ @Command @Override public void inbox() { @@ -356,6 +364,11 @@ public class MessageClient implements IMessageClient, Runnable { } } + /** + * Deletes a message with the given ID from the MailboxServer. + * + * @param id The ID of the message that should be deleted. + */ @Command @Override public void delete(String id) { @@ -443,6 +456,16 @@ public class MessageClient implements IMessageClient, Runnable { } } + /** + * Takes a message from the command line and sends it to the TransferServer. + *
+ * The message is replayed to the TransferServer via the DMTP2.0 + * protocol and a hash of the message is calculated and appended. + * + * @param to comma separated list of recipients + * @param subject the message subject + * @param data the message data + */ @Command @Override public void msg(String to, String subject, String data) { @@ -530,6 +553,9 @@ public class MessageClient implements IMessageClient, Runnable { } } + /** + * Shuts down the MessageClient. + */ @Command @Override public void shutdown() {