Package org.epics.gpclient
Interface PVReaderConfiguration<T>
-
- Type Parameters:
T
- the type of the expression
- All Known Implementing Classes:
PVConfiguration
public interface PVReaderConfiguration<T>
An expression used to set the final parameters on how the pv expression should be read.- Author:
- carcassi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PVReaderConfiguration<T>
addListener(Consumer<PVEvent> listener)
Adds a listener for the expression.PVReaderConfiguration<T>
addReadListener(PVReaderListener<T> listener)
Adds a read listener for the expression.PVReaderConfiguration<T>
connectionTimeout(Duration timeout)
Sends aTimeoutException
if the expression does not connect within the given duration.PVReaderConfiguration<T>
connectionTimeout(Duration timeout, String timeoutMessage)
Sends aTimeoutException
with the given message if the expression does not connect within the given duration.PVReaderConfiguration<T>
from(DataSource dataSource)
Defines which DataSource should be used to read/write the data.PVReaderConfiguration<T>
maxRate(Duration maxRate)
The maximum rate of notifications for this reader/writer.PVReaderConfiguration<T>
notifyOn(Executor onThread)
Defines on which thread to notify the client.PVReader<T>
start()
Starts processing events for the expression.
-
-
-
Method Detail
-
from
PVReaderConfiguration<T> from(DataSource dataSource)
Defines which DataSource should be used to read/write the data.- Parameters:
dataSource
- the data source to access the data- Returns:
- this
-
notifyOn
PVReaderConfiguration<T> notifyOn(Executor onThread)
Defines on which thread to notify the client.- Parameters:
onThread
- the thread on which to notify- Returns:
- this
-
connectionTimeout
PVReaderConfiguration<T> connectionTimeout(Duration timeout)
Sends aTimeoutException
if the expression does not connect within the given duration.- Parameters:
timeout
- time to wait before the timeout- Returns:
- this
-
connectionTimeout
PVReaderConfiguration<T> connectionTimeout(Duration timeout, String timeoutMessage)
Sends aTimeoutException
with the given message if the expression does not connect within the given duration.- Parameters:
timeout
- time to wait before the timeouttimeoutMessage
- the exception message- Returns:
- this
-
maxRate
PVReaderConfiguration<T> maxRate(Duration maxRate)
The maximum rate of notifications for this reader/writer.- Parameters:
maxRate
- the maximum time between notifications- Returns:
- this
-
addReadListener
PVReaderConfiguration<T> addReadListener(PVReaderListener<T> listener)
Adds a read listener for the expression.- Parameters:
listener
- a new listener- Returns:
- this
-
addListener
PVReaderConfiguration<T> addListener(Consumer<PVEvent> listener)
Adds a listener for the expression.- Parameters:
listener
- a new listener- Returns:
- this
-
-