visad.collab
Class ReferenceMonitorEvent

java.lang.Object
  |
  +--visad.collab.MonitorEvent
        |
        +--visad.collab.ReferenceMonitorEvent

public class ReferenceMonitorEvent
extends MonitorEvent

ReferenceMonitorEvent is the VisAD class for RemoteReferenceLink-related events from display monitors. They are sourced by DisplayMonitor objects and received by MonitorCallback objects.

See Also:
Serialized Form

Fields inherited from class visad.collab.MonitorEvent
CONTROL_CHANGED, CONTROL_INIT_REQUESTED, MAP_ADDED, MAP_CHANGED, MAP_REMOVED, MAPS_CLEARED, MESSAGE_SENT, REFERENCE_ADDED, REFERENCE_REMOVED, seqNum, type
 
Constructor Summary
ReferenceMonitorEvent(int type, int originator, RemoteReferenceLink link)
          Creates a ReferenceMonitorEvent for the specified RemoteReferenceLink.
ReferenceMonitorEvent(int type, RemoteReferenceLink link)
          Creates a ReferenceMonitorEvent for the specified RemoteReferenceLink.
 
Method Summary
 Object clone()
          Returns an exact clone of this object.
 boolean equals(Object o)
          Returns true if the specified object matches this object.
 String getKey()
          Get the key used to uniquely identify this event.
 RemoteReferenceLink getLink()
          Gets the RemoteReferenceLink to which this event refers.
 String toString()
          Returns a String representation of this object.
 
Methods inherited from class visad.collab.MonitorEvent
getOriginator, getSequenceNumber, getType, getTypeName, getTypeName, setOriginator
 
Methods inherited from class java.lang.Object
, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReferenceMonitorEvent

public ReferenceMonitorEvent(int type,
                             RemoteReferenceLink link)
                      throws VisADException
Creates a ReferenceMonitorEvent for the specified RemoteReferenceLink.
Parameters:
type - The event type (either MonitorEvent.REFERENCE_ADDED or MonitorEvent.REFERENCE_REMOVED.)
link - The RemoteReferenceLink.
Throws:
VisADException - When a bad type is specified.

ReferenceMonitorEvent

public ReferenceMonitorEvent(int type,
                             int originator,
                             RemoteReferenceLink link)
                      throws VisADException
Creates a ReferenceMonitorEvent for the specified RemoteReferenceLink.
Parameters:
type - The event type (either MonitorEvent.REFERENCE_ADDED or MonitorEvent.REFERENCE_REMOVED.)
originator - The ID of the connection from which this event came, relative to the receiver of the event.
link - The RemoteReferenceLink.
Throws:
VisADException - When a bad type is specified.
Method Detail

getKey

public String getKey()
Get the key used to uniquely identify this event.
Returns:
The unique key.
Overrides:
getKey in class MonitorEvent

getLink

public RemoteReferenceLink getLink()
Gets the RemoteReferenceLink to which this event refers.

equals

public boolean equals(Object o)
Returns true if the specified object matches this object.
Parameters:
o - The object to compare.
Overrides:
equals in class Object

clone

public Object clone()
Returns an exact clone of this object.
Overrides:
clone in class MonitorEvent

toString

public String toString()
Returns a String representation of this object.
Overrides:
toString in class MonitorEvent