visad
Class ThingReferenceImpl
- java.lang.Object
-
- visad.ThingReferenceImpl
-
- All Implemented Interfaces:
- ThingReference
- Direct Known Subclasses:
- DataReferenceImpl
public class ThingReferenceImpl extends java.lang.Object implements ThingReference
ThingReferenceImpl is a local implementation of ThingReference.ThingReferenceImpl is not Serializable and should not be copied between JVMs.
-
-
Constructor Summary
Constructors Constructor and Description ThingReferenceImpl(java.lang.String name)Constructs from a name for the instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ThingChangedEventacknowledgeThingChanged(Action a)ThingChangedEventadaptedAcknowledgeThingChanged(RemoteAction a)ThingChangedEventadaptedPeekThingChanged(RemoteAction a)voidaddThingChangedListener(ThingChangedListener listener, long id)Adds a listener for changes in the underlyingThing.booleanequals(java.lang.Object obj)visad.ThingChangedLinkfindThingChangedLink(Action a)find ThingChangedLink with actionjava.lang.StringgetName()ThinggetThing()longgetTick()longincTick()synchronized because incTick, setThing, and adaptedSetThing share access to thing and refThingChangedEventpeekThingChanged(Action a)voidremoveThingChangedListener(ThingChangedListener a)ThingChangedListener must be local ActionImplvoidsetThing(Thing t)Sets the underlying thing to reference.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ThingReferenceImpl
public ThingReferenceImpl(java.lang.String name) throws VisADExceptionConstructs from a name for the instance.- Parameters:
name- The name for this instance.- Throws:
VisADException- if the name isnull.
-
-
Method Detail
-
getThing
public Thing getThing()
- Specified by:
getThingin interfaceThingReference
-
setThing
public void setThing(Thing t) throws VisADException, java.rmi.RemoteException
Sets the underlying thing to reference.- Specified by:
setThingin interfaceThingReference- Parameters:
t- The thing to reference.- Throws:
RemoteVisADException- if the thing is aRemoteThing.VisADException- if a VisAD failure occurs.java.rmi.RemoteException- if a Java RMI failure occurs.
-
getTick
public long getTick()
- Specified by:
getTickin interfaceThingReference
-
incTick
public long incTick() throws VisADException, java.rmi.RemoteExceptionsynchronized because incTick, setThing, and adaptedSetThing share access to thing and ref- Specified by:
incTickin interfaceThingReference- Throws:
VisADExceptionjava.rmi.RemoteException
-
peekThingChanged
public ThingChangedEvent peekThingChanged(Action a) throws VisADException
- Specified by:
peekThingChangedin interfaceThingReference- Throws:
VisADException
-
acknowledgeThingChanged
public ThingChangedEvent acknowledgeThingChanged(Action a) throws VisADException
- Specified by:
acknowledgeThingChangedin interfaceThingReference- Throws:
VisADException
-
adaptedPeekThingChanged
public ThingChangedEvent adaptedPeekThingChanged(RemoteAction a) throws VisADException
- Throws:
VisADException
-
adaptedAcknowledgeThingChanged
public ThingChangedEvent adaptedAcknowledgeThingChanged(RemoteAction a) throws VisADException
- Throws:
VisADException
-
findThingChangedLink
public visad.ThingChangedLink findThingChangedLink(Action a) throws VisADException
find ThingChangedLink with action- Throws:
VisADException
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceThingReference
-
addThingChangedListener
public void addThingChangedListener(ThingChangedListener listener, long id) throws RemoteVisADException, ReferenceException, VisADException
Adds a listener for changes in the underlyingThing. If the thing changes, then the listener is notified.- Specified by:
addThingChangedListenerin interfaceThingReference- Parameters:
listener- The listener.id- The id of the correspondingReferenceActionLink.- Throws:
RemoteVisADException- if the listener isn't anActionImpl.ReferenceException- if the listener is already registered.VisADException- if a VisAD failure occurs in a subsystem.
-
removeThingChangedListener
public void removeThingChangedListener(ThingChangedListener a) throws VisADException
ThingChangedListener must be local ActionImpl- Specified by:
removeThingChangedListenerin interfaceThingReference- Throws:
VisADException
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG