Class Message

  • All Implemented Interfaces:
    java.io.Serializable

    public class Message
    extends WWEvent
    General purpose message event.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String name
      Message name.
      protected long when
      Time at which the message was sent.
      • Fields inherited from class java.util.EventObject

        source
    • Constructor Summary

      Constructors 
      Constructor Description
      Message​(java.lang.String name, java.lang.Object source)
      Create a message.
      Message​(java.lang.String name, java.lang.Object source, long when)
      Create a message, with a timestamp.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Indicates the message name.
      long getWhen()
      Indicates the time at which the message was sent.
      • Methods inherited from class java.util.EventObject

        getSource, toString
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        protected java.lang.String name
        Message name.
      • when

        protected long when
        Time at which the message was sent.
    • Constructor Detail

      • Message

        public Message​(java.lang.String name,
                       java.lang.Object source)
        Create a message. The message will be timestamped with the current system time.
        Parameters:
        name - The name of the message.
        source - The object that generated the message.
      • Message

        public Message​(java.lang.String name,
                       java.lang.Object source,
                       long when)
        Create a message, with a timestamp.
        Parameters:
        name - The name of the message.
        source - The object that generated the message.
        when - The timestamp to apply to the message.
    • Method Detail

      • getName

        public java.lang.String getName()
        Indicates the message name.
        Returns:
        The message name.
      • getWhen

        public long getWhen()
        Indicates the time at which the message was sent.
        Returns:
        Time, in milliseconds since the Epoch, at which the message was sent.