T
- the type of the expressionpublic class PVWriterConfiguration<T> extends Object
Modifier and Type | Method and Description |
---|---|
PVWriter<T> |
async()
Creates a new PVWriter where the
PVWriter.write(java.lang.Object)
method is asynchronous (i.e. |
PVWriterConfiguration<T> |
from(DataSource dataSource)
Defines which DataSource should be used to read the data.
|
PVWriterConfiguration<T> |
notifyOn(Executor onThread)
Defines on which thread the PVManager should notify the client.
|
PVWriterConfiguration<T> |
routeExceptionsTo(ExceptionHandler exceptionHandler)
Forwards exception to the given exception handler.
|
PVWriter<T> |
sync()
Creates a new PVWriter where the
PVWriter.write(java.lang.Object)
method is synchronous (i.e. |
PVWriterConfiguration<T> |
timeout(org.epics.util.time.TimeDuration timeout)
Sets a timeout for write operation.
|
PVWriterConfiguration<T> |
timeout(org.epics.util.time.TimeDuration timeout,
String timeoutMessage)
Sets a timeout for write operations.
|
PVWriterConfiguration<T> |
writeListener(PVWriterListener<? extends T> listener)
Adds a listener notified for any writer event (write result, connection and errors).
|
public PVWriterConfiguration<T> from(DataSource dataSource)
dataSource
- a connection managerpublic PVWriterConfiguration<T> notifyOn(Executor onThread)
onThread
- the thread on which to notifypublic PVWriterConfiguration<T> timeout(org.epics.util.time.TimeDuration timeout)
For more details, consult timeout(org.epics.util.time.TimeDuration, java.lang.String)
.
timeout
- the duration of the timeout; can't be nullpublic PVWriterConfiguration<T> timeout(org.epics.util.time.TimeDuration timeout, String timeoutMessage)
When a write operation lasts longer than the given timeout, a notification
is sent with a TimeoutException
. Note that, in the current implementation,
the write is not cancelled and may still trigger a second notification.
With a synch write, the method returns at the timeout expiration with
the exception.
timeout
- the duration of the timeout; can't be nulltimeoutMessage
- the message for the reported timeoutpublic PVWriterConfiguration<T> writeListener(PVWriterListener<? extends T> listener)
Registering a listener here guarantees that no event is ever missed.
listener
- the listener to registerpublic PVWriterConfiguration<T> routeExceptionsTo(ExceptionHandler exceptionHandler)
exceptionHandler
- an exception handlerpublic PVWriter<T> sync()
PVWriter.write(java.lang.Object)
method is synchronous (i.e. blocking).public PVWriter<T> async()
PVWriter.write(java.lang.Object)
method is asynchronous (i.e. non-blocking).Copyright © 2010–2015. All rights reserved.