## visad.collab
Class MonitorEvent

    java.lang.Object
      visad.collab.MonitorEvent

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  ControlMonitorEvent, MapMonitorEvent, MessageMonitorEvent, ReferenceMonitorEvent

public abstract class MonitorEvent
extends Object
implements Serializable

`MonitorEvent` is the VisAD superclass for events from display monitors.

They are sourced by `DisplayMonitor` objects and received by `MonitorCallback` objects.

See Also:
  Serialized Form

Field Summary
`static int` `CONTROL_CHANGED` This event occurs whenever the state of a `Control` attached to a `Display` is changed.
`static int` `CONTROL_INIT_REQUESTED` This event occurs whenever a `Control` attached to a `Display` requests that it be initialized to the state of a remote `Control`.
`static int` `MAP_ADDED` This event occurs whenever a `ConstantMap` or `ScalarMap` is added to a `Display`.
`static int` `MAP_CHANGED` This event occurs whenever a `ConstantMap` or `ScalarMap` is added to a `Display`.
`static int` `MAP_REMOVED` This event occurs whenever a `ConstantMap` or `ScalarMap` is removed from a `Display`.
`static int` `MAPS_CLEARED` This event occurs whenever the `ConstantMap`s and `ScalarMap`s are cleared from a `Display`.
`static int` `MESSAGE_SENT` This event occurs whenever a message is sent.
`static int` `REFERENCE_ADDED` This event occurs whenever a `DataReference` is added to a `Display`.
`static int` `REFERENCE_REMOVED` This event occurs whenever a `DataReference` is removed from a `Display`.
`protected int` `seqNum`
`protected int` `type`

Constructor Summary
`MonitorEvent(int type, int originator)` Creates a `MonitorEvent`

Method Summary
`abstract Object` `clone()` Returns an exact copy of this `MonitorEvent`.
`abstract String` `getKey()` Get the key used to uniquely identify this event.
`int` `getOriginator()` Gets the originator of this `MonitorEvent`.
`int` `getSequenceNumber()` Gets the sequence number of this `MonitorEvent`.
`int` `getType()` Gets the type of this `MonitorEvent`.
`String` `getTypeName()` Returns a `String` description of this `MonitorEvent`'s type.
`static String` `getTypeName(int type)` Returns a `String` description of the specified `MonitorEvent` type.
`void` `setOriginator(int id)` Sets the originator of this `MonitorEvent`.
`String` `toString()` Returns a `String` representation of this object.

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### MAP_ADDED

    public static final int MAP_ADDED

  This event occurs whenever a `ConstantMap` or `ScalarMap` is added to a `Display`.

  See Also:
    Constant Field Values

### MAP_CHANGED

    public static final int MAP_CHANGED

  This event occurs whenever a `ConstantMap` or `ScalarMap` is added to a `Display`.

  See Also:
    Constant Field Values

### MAPS_CLEARED

    public static final int MAPS_CLEARED

  This event occurs whenever the `ConstantMap`s and `ScalarMap`s are cleared from a `Display`.

  See Also:
    Constant Field Values

### MAP_REMOVED

    public static final int MAP_REMOVED

  This event occurs whenever a `ConstantMap` or `ScalarMap` is removed from a `Display`.

  See Also:
    Constant Field Values

### REFERENCE_ADDED

    public static final int REFERENCE_ADDED

  This event occurs whenever a `DataReference` is added to a `Display`.

  See Also:
    Constant Field Values

### REFERENCE_REMOVED

    public static final int REFERENCE_REMOVED

  This event occurs whenever a `DataReference` is removed from a `Display`.

  See Also:
    Constant Field Values

### CONTROL_INIT_REQUESTED

    public static final int CONTROL_INIT_REQUESTED

  This event occurs whenever a `Control` attached to a `Display` requests that it be initialized to the state of a remote `Control`.

  See Also:
    Constant Field Values

### CONTROL_CHANGED

    public static final int CONTROL_CHANGED

  This event occurs whenever the state of a `Control` attached to a `Display` is changed.

  See Also:
    Constant Field Values

### MESSAGE_SENT

    public static final int MESSAGE_SENT

  This event occurs whenever a message is sent.

  See Also:
    Constant Field Values

### seqNum

    protected int seqNum

### type

    protected int type

Constructor Detail

### MonitorEvent

    public MonitorEvent(int type,
                        int originator)

  Creates a `MonitorEvent`

Parameters:
  `type` - The event type.
  `originator` - The ID of the connection from which this event came, relative to the receiver of the event.

Method Detail

### getType

    public int getType()

  Gets the type of this `MonitorEvent`.

### getKey

    public abstract String getKey()

  Get the key used to uniquely identify this event.

  Returns:
    The unique key.

### getOriginator

    public int getOriginator()

  Gets the originator of this `MonitorEvent`.

### getSequenceNumber

    public int getSequenceNumber()

  Gets the sequence number of this `MonitorEvent`.

### getTypeName

    public static String getTypeName(int type)

  Returns a `String` description of the specified `MonitorEvent` type.

  Parameters:
    `type` - the `MonitorEvent` type.
  Returns:
    name of the specified type.

### getTypeName

    public String getTypeName()

  Returns a `String` description of this `MonitorEvent`'s type.

  Returns:
    name of this event's type.

### setOriginator

    public void setOriginator(int id)

  Sets the originator of this `MonitorEvent`.

  Parameters:
    `id` - The ID of the connection from which this event came, relative to the receiver of the event.

### clone

    public abstract Object clone()

  Returns an exact copy of this `MonitorEvent`.

### toString

    public String toString()

  Returns a `String` representation of this object.