courses.dsv2pvt.messageclasses
Class Msg

java.lang.Object
  extended bycourses.dsv2pvt.messageclasses.Msg
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ClientStatus, ClientToClientMsg, Disconnect, GetMail, MessageFailed, Ping, Pong, Present, UGotMail

public abstract class Msg
extends Object
implements Serializable

Msg is the abstract base class of all messages in the message classes package. Instances of Msg retrieves the senders username from the system and uses that as the from address.

See Also:
Serialized Form

Constructor Summary
Msg()
          Retrieves the username of the current user.
 
Method Summary
 String getSender()
          Returns the username of the user owning the virtual machine that was used to instantiate the message.
 String toString()
          Prints the class name of the message without prepending the package name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Msg

public Msg()
Retrieves the username of the current user.

Method Detail

getSender

public final String getSender()
Returns the username of the user owning the virtual machine that was used to instantiate the message.


toString

public String toString()
Prints the class name of the message without prepending the package name.