visad
Class ThingImpl

java.lang.Object
  extended byvisad.ThingImpl
All Implemented Interfaces:
Cloneable, Serializable, Thing
Direct Known Subclasses:
DataImpl, VMethod, VRealType

public class ThingImpl
extends Object
implements Thing, Cloneable, Serializable

ThingImpl is the abstract superclass of the VisAD objects that send ThingChangedEvents to Actions.

See Also:
Serialized Form

Nested Class Summary
(package private)  class ThingImpl.RemotePair
           
 
Constructor Summary
ThingImpl()
           
 
Method Summary
(package private)  void adaptedAddReference(RemoteThingReference r, RemoteThing t)
          method for use by RemoteThingImpl that adapts this ThingImpl
(package private)  void adaptedRemoveReference(RemoteThingReference r, RemoteThing t)
          method for use by RemoteThingImpl that adapts this ThingImpl
 void addReference(ThingReference r)
          Adds a listener for changes to this thing.
 Object clone()
          Clones this instance.
 void notifyReferences()
          notify local ThingReferenceImpl-s that this ThingImpl has changed; incTick in RemoteThingImpl for RemoteThingReferenceImpl-s; would like 'default' visibility here, but must be declared 'public' because it is defined in the Thing interface
 void removeReference(ThingReference r)
          remove a ThingReference to this ThingImpl; must be local ThingReferenceImpl; called by ThingReference.setThing; would like 'default' visibility here, but must be declared 'public' because it is defined in the Thing interface
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThingImpl

public ThingImpl()
Method Detail

addReference

public void addReference(ThingReference r)
                  throws RemoteVisADException
Adds a listener for changes to this thing. The listener will be notified when this thing changes.

Specified by:
addReference in interface Thing
Parameters:
r - The listener for changes.
Throws:
RemoteVisADException - if the listener isn't a ThingReferenceImpl.
VisADException - if a VisAD failure occurs.

adaptedAddReference

void adaptedAddReference(RemoteThingReference r,
                         RemoteThing t)
                   throws VisADException
method for use by RemoteThingImpl that adapts this ThingImpl

Throws:
VisADException

removeReference

public void removeReference(ThingReference r)
                     throws VisADException
remove a ThingReference to this ThingImpl; must be local ThingReferenceImpl; called by ThingReference.setThing; would like 'default' visibility here, but must be declared 'public' because it is defined in the Thing interface

Specified by:
removeReference in interface Thing
Throws:
VisADException

adaptedRemoveReference

void adaptedRemoveReference(RemoteThingReference r,
                            RemoteThing t)
                      throws VisADException
method for use by RemoteThingImpl that adapts this ThingImpl

Throws:
VisADException

notifyReferences

public void notifyReferences()
                      throws VisADException,
                             RemoteException
notify local ThingReferenceImpl-s that this ThingImpl has changed; incTick in RemoteThingImpl for RemoteThingReferenceImpl-s; would like 'default' visibility here, but must be declared 'public' because it is defined in the Thing interface

Throws:
VisADException
RemoteException

clone

public Object clone()
             throws CloneNotSupportedException

Clones this instance. Information on the set of listeners to changes in this instance is not cloned, so -- following the general contract of the clone() method -- subclasses should not test for equality of the set of listeners in any equals(Object) method.

This implementation never throws CloneNotSupportException.

Returns:
A clone of this instance.
Throws:
CloneNotSupportedException - if cloning isn't supported.