| Modifier and Type | Method and Description |
|---|---|
void |
addPVReaderListener(Class<?> clazz,
PVReaderListener listener)
Adds a listener to the value, which is notified only if the value is
of a given type.
|
void |
addPVReaderListener(PVReaderListener<? super R> listener)
Adds a listener to the value.
|
void |
addPVWriterListener(PVWriterListener<? extends W> listener)
Adds a listener to the value.
|
void |
close()
De-registers all listeners, stops all notifications and closes all
connections from the data sources needed by this.
|
String |
getName()
Returns the name of the PVReader.
|
R |
getValue()
Returns the value of the PVReader.
|
boolean |
isClosed()
True if no more notifications are going to be sent for this PVReader.
|
boolean |
isConnected()
True if the reader is connected.
|
boolean |
isPaused()
Whether the reader is paused.
|
boolean |
isWriteConnected()
True if the writer is connected and ready to write.
|
Exception |
lastException()
Returns the last exception that was generated preparing the value
for this PVReader and clears it (subsequent call will return null).
|
Exception |
lastWriteException()
Returns the last exception that was generated by write operations
and clears it (subsequent call will return null).
|
void |
removePVReaderListener(PVReaderListener<? super R> listener)
Removes a listener to the value.
|
void |
removePVWriterListener(PVWriterListener<? extends W> listener)
Removes a listener to the value.
|
void |
setPaused(boolean paused)
Pauses or resumes the reader notifications.
|
void |
write(W newValue)
Writes a new value.
|
public void addPVWriterListener(PVWriterListener<? extends W> listener)
PVWriteraddPVWriterListener in interface PVWriter<W>listener - a new listenerpublic void removePVWriterListener(PVWriterListener<? extends W> listener)
PVWriterremovePVWriterListener in interface PVWriter<W>listener - the old listenerpublic void write(W newValue)
PVWriterpublic Exception lastWriteException()
PVWriterlastWriteException in interface PVWriter<W>public void addPVReaderListener(PVReaderListener<? super R> listener)
PVReaderThis method is thread-safe.
addPVReaderListener in interface PVReader<R>listener - a new listenerpublic void addPVReaderListener(Class<?> clazz, PVReaderListener listener)
PVReaderThis method is thread-safe.
addPVReaderListener in interface PVReader<R>clazz - type to filter notifications forlistener - a new listenerpublic void removePVReaderListener(PVReaderListener<? super R> listener)
PVReaderThis method is thread-safe.
removePVReaderListener in interface PVReader<R>listener - the old listenerpublic String getName()
PVReaderThis method is thread safe.
public R getValue()
PVReaderThis method is thread-safe.
public void close()
PVReaderpublic boolean isClosed()
PVReaderpublic Exception lastException()
PVReaderThis method is thread-safe.
lastException in interface PVReader<R>public boolean isPaused()
PVReaderThis method is thread-safe.
public void setPaused(boolean paused)
PVReaderNote that since notifications may still be in flight, you may receive notifications after setting the pause state to on. The paused flag on the reader, though, is changed immediately.
This method is thread-safe.
public boolean isConnected()
PVReaderCurrently, a reader is defined as connected if all the channels are connected. This means that you still may get updates even if this method returns false. You can use this method to determine whether your notification comes from a complete set.
When using VTypes, you should use the Alarm interface to
get the connection status. This scales when you get aggregates, such
as lists or maps of channels. This method does obviously not scale functionally
since, in an aggregate, it can't tell you which channel of the set
is connected or not.
This method is thread-safe.
isConnected in interface PVReader<R>public boolean isWriteConnected()
PVWriterFalse if the channel is not connected, or is connected but can't be written to.
isWriteConnected in interface PVWriter<W>Copyright © 2010–2015. All rights reserved.