![]() |
OpenSplice Java 5 DCPS
v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
|
A convenience class SubscriberAdapter is offered which has an empty implementation of all org.omg.dds.sub.SubscriberListener callback functions when the application extends from this class only the used callback functions that the user wants to use need to be implemented. More...
Public Member Functions | |
void | onDataAvailable (DataAvailableEvent<?> status) |
This operation is the external operation (interface, which must be implemented by the application) that is called by the Data Distribution Service when new data is available for this DataReader. More... | |
void | onDataOnReaders (DataOnReadersEvent status) |
This operation is the external operation (interface, which must be implemented by the application) that is called by the Data Distribution Service when new data is available for this Subscriber. More... | |
void | onLivelinessChanged (LivelinessChangedEvent<?> status) |
This operation is the external operation (interface, which must be implemented by the application) that is called by the Data Distribution Service when the liveliness of one or more DataWriter objects that were writing instances read through this DataReader has changed. More... | |
void | onRequestedDeadlineMissed (RequestedDeadlineMissedEvent<?> status) |
This operation is the external operation (interface, which must be implemented by the application) that is called by the Data Distribution Service when the deadline that the DataReader was expecting through its DeadlineQosPolicy was not respected for a specific instance. More... | |
void | onRequestedIncompatibleQos (RequestedIncompatibleQosEvent<?> status) |
This operation is the external operation (interface, which must be implemented by the application) that is called by the Data Distribution Service when the RequestedIncompatibleQosStatus changes. More... | |
void | onSampleLost (SampleLostEvent<?> status) |
This operation is the external operation (interface, which must be implemented by the application) that is called by the Data Distribution Service when a sample is lost and this is detected. More... | |
void | onSampleRejected (SampleRejectedEvent<?> status) |
This operation is the external operation (interface, which must be implemented by the application) that is called by the Data Distribution Service when a (received) sample has been rejected. More... | |
void | onSubscriptionMatched (SubscriptionMatchedEvent<?> status) |
This operation is called by the Data Distribution Service when a new match has been discovered for the current subscription, or when an existing match has ceased to exist. More... | |
A convenience class SubscriberAdapter is offered which has an empty implementation of all org.omg.dds.sub.SubscriberListener callback functions when the application extends from this class only the used callback functions that the user wants to use need to be implemented.
Definition at line 35 of file SubscriberAdapter.java.
void org.omg.dds.sub.SubscriberAdapter.onDataAvailable | ( | DataAvailableEvent<?> | status | ) |
This operation is the external operation (interface, which must be implemented by the application) that is called by the Data Distribution Service when new data is available for this DataReader.
The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant SubscriberListener is installed and enabled for the DataAvailableStatus.
The statuses DataOnReadersStatus and DataAvailableStatus will occur together. In case these status changes occur, the Data Distribution Service will look for an attached and activated SubscriberListener or DomainParticipantListener (in that order) for the DataOnReadersStatus. In case the DataOnReadersStatus can not be handled, the Data Distribution Service will look for an attached and activated DataReaderListener, SubscriberListener or DomainParticipantListener for the DataAvailableStatus (in that order).
Note that if onDataOnReaders is called, then the Data Distribution Service will not try to call onDataAvailable, however, the application can force a call to the DataReader objects that have data by means of the notifyDatareaders operation.
status | Contains the DataAvailableStatus object (this is an input to the application). |
Implements org.omg.dds.sub.SubscriberListener.
Definition at line 38 of file SubscriberAdapter.java.
void org.omg.dds.sub.SubscriberAdapter.onDataOnReaders | ( | DataOnReadersEvent | status | ) |
This operation is the external operation (interface, which must be implemented by the application) that is called by the Data Distribution Service when new data is available for this Subscriber.
The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant SubscriberListener is installed and enabled for the DataOnReadersStatus.
The statuses DataOnReadersStatus and DataAvailableStatus will occur together. In case these status changes occur, the Data Distribution Service will look for an attached and activated SubscriberListener or DomainParticipantListener (in that order) for the DataOnReadersStatus. In case the DataOnReadersStatus can not be handled, the Data Distribution Service will look for an attached and activated DataReaderListener, SubscriberListener or DomainParticipantListener for the DataAvailableStatus (in that order).
Note that if onDataOnReaders is called, then the Data Distribution Service will not try to call onDataAvailable, however, the application can force a call to the DataReader objects that have data by means of the notifyDatareaders operation.
status | Contains the DataOnReadersStatus object (this is an input to the application). |
Implements org.omg.dds.sub.SubscriberListener.
Definition at line 82 of file SubscriberAdapter.java.
void org.omg.dds.sub.SubscriberAdapter.onLivelinessChanged | ( | LivelinessChangedEvent<?> | status | ) |
This operation is the external operation (interface, which must be implemented by the application) that is called by the Data Distribution Service when the liveliness of one or more DataWriter objects that were writing instances read through this DataReader has changed.
In other words, some DataWriter have become "alive" or "not alive". The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant SubscriberListener is installed and enabled for the LivelinessChangedStatus.
The Data Distribution Service will provide a reference to the LivelinessChangedStatus object for use by the application.
status | Contains the LivelinessChangedStatus object (this is an input to the application). |
Implements org.omg.dds.sub.SubscriberListener.
Definition at line 44 of file SubscriberAdapter.java.
void org.omg.dds.sub.SubscriberAdapter.onRequestedDeadlineMissed | ( | RequestedDeadlineMissedEvent<?> | status | ) |
This operation is the external operation (interface, which must be implemented by the application) that is called by the Data Distribution Service when the deadline that the DataReader was expecting through its DeadlineQosPolicy was not respected for a specific instance.
The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant SubscriberListener is installed and enabled for the RequestedDeadlineMissedStatus.
The Data Distribution Service will provide a reference to the RequestedDeadlineMissedStatus object in the parameter status for use by the application.
status | Contains the RequestedDeadlineMissedStatus object (this is an input to the application). |
Implements org.omg.dds.sub.SubscriberListener.
Definition at line 50 of file SubscriberAdapter.java.
void org.omg.dds.sub.SubscriberAdapter.onRequestedIncompatibleQos | ( | RequestedIncompatibleQosEvent<?> | status | ) |
This operation is the external operation (interface, which must be implemented by the application) that is called by the Data Distribution Service when the RequestedIncompatibleQosStatus changes.
The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant SubscriberListener is installed and enabled for the RequestedIncompatibleQosStatus.
The Data Distribution Service will provide a reference to the RequestedIncompatibleQosStatus object in the parameter status, for use by the application.
The application can use this operation as a callback function implementing a proper response to the status change. This operation is enabled by setting the RequestedIncompatibleQosStatus in the listener status mask
status | Contains the RequestedIncompatibleQosStatus object (this is an input to the application). |
Implements org.omg.dds.sub.SubscriberListener.
Definition at line 57 of file SubscriberAdapter.java.
void org.omg.dds.sub.SubscriberAdapter.onSampleLost | ( | SampleLostEvent<?> | status | ) |
This operation is the external operation (interface, which must be implemented by the application) that is called by the Data Distribution Service when a sample is lost and this is detected.
The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant SubscriberListener is installed and enabled for the SampleLostStatus.
The Data Distribution Service will provide a reference to the SampleLostStatus object for use by the application.
status | Contains the SampleLostStatus object (this is an input to the application). |
Implements org.omg.dds.sub.SubscriberListener.
Definition at line 64 of file SubscriberAdapter.java.
void org.omg.dds.sub.SubscriberAdapter.onSampleRejected | ( | SampleRejectedEvent<?> | status | ) |
This operation is the external operation (interface, which must be implemented by the application) that is called by the Data Distribution Service when a (received) sample has been rejected.
Samples may be rejected by the DataReader when it runs out of resource_limits to store incoming samples. Usually this means that old samples need to be 'consumed' (for example by 'taking' them instead of 'reading' them) to make room for newly incoming samples.
The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant SubscriberListener is installed and enabled for the SampleRejectedStatus.
The Data Distribution Service will provide a reference to the SampleRejectedStatus object in the parameter status for use by the application.
status | Contains the SampleRejectedStatus object (this is an input to the application). |
Implements org.omg.dds.sub.SubscriberListener.
Definition at line 70 of file SubscriberAdapter.java.
void org.omg.dds.sub.SubscriberAdapter.onSubscriptionMatched | ( | SubscriptionMatchedEvent<?> | status | ) |
This operation is called by the Data Distribution Service when a new match has been discovered for the current subscription, or when an existing match has ceased to exist.
Usually this means that a new DataWriter that matches the Topic and that has compatible Qos as the current DataReader has either been discovered, or that a previously discovered DataWriter has ceased to be matched to the current DataReader. A DataWriter may cease to match when it gets deleted, when it changes its Qos to a value that is incompatible with the current DataReader or when either the DataReader or the DataWriter has chosen to put its matching counterpart on its ignore-list using the ignoreSubscription or ignorePublication operations.
The implementation of this Listener operation may be left empty when this functionality is not needed: it will only be called when the relevant SubscriberListener is installed and enabled for the SubscriptionMatchedStatus
status | Contains the SubscriptionMatchedStatus object (this is an input to the application). |
Implements org.omg.dds.sub.SubscriberListener.
Definition at line 76 of file SubscriberAdapter.java.