T - the type of data which the monitor will transport.public class MonitorRequest<T> extends java.lang.Object implements Monitor<T>, NotifyResponseRequest
| Modifier and Type | Field and Description |
|---|---|
protected ChannelImpl<?> |
channel
Channel.
|
protected java.util.concurrent.atomic.AtomicBoolean |
closed
Closed flag.
|
protected java.util.function.Consumer<? super T> |
consumer
Reference to an object which will consume monitor update events.
|
ALARM_MASK, LOG_MASK, PROPERTY_MASK, VALUE_MASK| Constructor and Description |
|---|
MonitorRequest(ChannelImpl<?> channel,
Transport transport,
TypeSupports.TypeSupport<T> typeSupport,
int mask,
MonitorNotificationService<T> monitorNotificationService,
java.util.function.Consumer<? super T> consumer) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancel response request (always to be called to complete/destroy).
|
void |
close() |
void |
exception(int errorCode,
java.lang.String errorMessage)
Exception response notification.
|
int |
getIOID()
Get I/O ID.
|
void |
response(int status,
short dataType,
int dataCount,
java.nio.ByteBuffer dataPayloadBuffer)
Notification response.
|
void |
resubscribe(Transport transport) |
protected final ChannelImpl<?> channel
protected final java.util.function.Consumer<? super T> consumer
protected final java.util.concurrent.atomic.AtomicBoolean closed
public MonitorRequest(ChannelImpl<?> channel, Transport transport, TypeSupports.TypeSupport<T> typeSupport, int mask, MonitorNotificationService<T> monitorNotificationService, java.util.function.Consumer<? super T> consumer)
channel - the channel.transport - the transport.typeSupport - the object which will provide type support.mask - the mask.monitorNotificationService - the monitor notification service.consumer - the consumer to be informed of monitor update events.public int getIOID()
ResponseRequestgetIOID in interface ResponseRequestpublic void response(int status,
short dataType,
int dataCount,
java.nio.ByteBuffer dataPayloadBuffer)
NotifyResponseRequestresponse in interface NotifyResponseRequeststatus - the CA status code.dataType - the CA data type.dataCount - the CA channel element count.dataPayloadBuffer - the buffer with the payloadpublic void cancel()
ResponseRequestcancel in interface ResponseRequestpublic void resubscribe(Transport transport)
public void exception(int errorCode,
java.lang.String errorMessage)
ResponseRequestexception in interface ResponseRequesterrorCode - exception code.errorMessage - received detailed message.