DataOnReadersEvent
and
DataAvailableEvent
.See: Description
Class | Description |
---|---|
DataAvailableStatus | |
DataOnReadersStatus | |
InconsistentTopicStatus |
Another topic exists with the same name but different characteristics.
|
LivelinessChangedStatus |
The liveliness of one or more
DataWriter s that were writing
instances read through the DataReader has changed. |
LivelinessLostStatus |
The liveliness that the
DataWriter has committed through its
Liveliness was not respected; thus DataReader
entities will consider the DataWriter as no longer "active." |
OfferedDeadlineMissedStatus |
The deadline that the
DataWriter has committed through its
Deadline was not respected for a specific instance. |
OfferedIncompatibleQosStatus |
A
QosPolicy value was incompatible with what was requested. |
PublicationMatchedStatus |
The
DataWriter has found a DataReader that matches the
Topic and has compatible QoS, or has ceased to be matched with a
DataReader that was previously considered to be matched. |
RequestedDeadlineMissedStatus |
The deadline that the
DataReader was expecting through its
Deadline was not respected for a specific instance. |
RequestedIncompatibleQosStatus |
A
QosPolicy value was incompatible with what is offered. |
SampleLostStatus |
A sample has been lost (never received).
|
SampleRejectedStatus |
A (received) sample has been rejected.
|
Status |
Status is the abstract root class for all communication status objects.
|
SubscriptionMatchedStatus |
The
DataReader has found a DataWriter that matches the
Topic and has compatible QoS, or has ceased to be matched with a
DataWriter that was previously considered to be matched. |
Enum | Description |
---|---|
SampleRejectedStatus.Kind |
DataOnReadersEvent
and
DataAvailableEvent
.Entity
's
communication status is a logical "StatusChangedFlag." This flag indicates
whether that particular communication status has changed since the last
time the status was "read" by the application. The way the status changes
is slightly different for the Plain Communication Status and the Read
Communication status.
Note that this description is only conceptual; it simply represents that
the Entity knows which specific statuses have changed. It does not imply
any particular implementation of the StatusChangedFlag in terms of boolean
values.
Changes in Plain Communication Status
For the plain communication status, the StatusChangedFlag flag is
initially set to false. It becomes true whenever the plain communication
status changes and it is reset to false each time the application accesses
the plain communication status via the proper get operation on the Entity.
The communication status is also reset to false whenever the associated
listener operation is called as the listener implicitly accesses the
status which is passed as a parameter to the operation. The fact that the
status is reset prior to calling the listener means that if the
application calls the get operation from inside the listener it will see
the status already reset.
An exception to this rule is when the associated listener is null. Such a
listener is treated as a NO-OP and the act of "calling" a null listener
does not reset the communication status.
For example, the value of the StatusChangedFlag associated with the
RequestedDeadlineMissedStatus
will become
true each time new deadline occurs (which increases the totalCount field
within RequestedDeadlineMissedStatus). The value changes to false when the
application accesses the status via
DataReader.getRequestedDeadlineMissedStatus()
.
Changes in Read Communication Statuses
For the read communication status, the StatusChangedFlag flag is initially
set to false.
The StatusChangedFlag becomes true when either a data sample arrives or
else the ViewState
,
SampleState
, or
InstanceState
of any existing sample changes for
any reason other than a call to DataReader.read()
,\
DataReader.take()
or their variants. Specifically
any of the following events will cause the StatusChangedFlag to become
true:
Ownership.getKind()
= Ownership.Kind.EXCLUSIVE
Ownership.getKind()
= Ownership.Kind.SHARED
.DataReaderListener.onDataAvailable(DataAvailableEvent)
is called or the DataReader.read()
or
DataReader.take()
operation (or their
variants) is called on the associated DataReader.SubscriberListener.onDataOnReaders(DataOnReadersEvent)
is called.DataReaderListener.onDataAvailable(DataAvailableEvent)
is called on any DataReader belonging to the
Subscriber
.DataReader.read()
or
DataReader.take()
operation (or their
variants) is called on any DataReader belonging to the
Subscriber.Entity
types support a listener, the type of
which is specialized to the specific type of the related Entity (e.g.
DataReaderListener
for the
DataReader
). Listeners are interfaces that the
application must implement. Each dedicated listener presents a list of
operations that correspond to the relevant communication status changes
(i.e. that the application may react to).
Listeners are stateless. It is thus possible to share the same
DataReaderListener instance among all the DataReader objects (assuming
that they will react similarly on similar status changes). Consequently,
the provided parameter contains a reference to the actual concerned Entity
(see EventObject.getSource()
).
Conditions and Wait-sets
As previously mentioned, Condition
s (in
conjunction with WaitSet
s) provide an alternative
mechanism to allow the middleware to communicate communication status
changes (including arrival of data) to the application.Copyright © 2014. All rights reserved.