NASA World Wind

gov.nasa.worldwind.event
Class Message

java.lang.Object
  extended by java.util.EventObject
      extended by gov.nasa.worldwind.event.WWEvent
          extended by gov.nasa.worldwind.event.Message
All Implemented Interfaces:
Serializable

public class Message
extends WWEvent

General purpose message event.

See Also:
Serialized Form

Field Summary
protected  String name
          Message name.
protected  long when
          Time at which the message was sent.
 
Fields inherited from class gov.nasa.worldwind.event.WWEvent
consumed
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
Message(String name, Object source)
          Create a message.
Message(String name, Object source, long when)
          Create a message, with a timestamp.
 
Method Summary
 String getName()
          Indicates the message name.
 long getWhen()
          Indicates the time at which the message was sent.
 
Methods inherited from class gov.nasa.worldwind.event.WWEvent
consume, isConsumed
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected String name
Message name.


when

protected long when
Time at which the message was sent.

Constructor Detail

Message

public Message(String name,
               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(String name,
               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 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.

NASA World Wind