![]() |
OpenSplice Java 5 DCPS
v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
|
This class is the abstract root for all the QoS policies. More...
Inherits Serializable, and org.omg.dds.core.DDSObject.
Inherited by org.omg.dds.core.policy.QosPolicy.ForDataReader, org.omg.dds.core.policy.QosPolicy.ForDataWriter, org.omg.dds.core.policy.QosPolicy.ForDomainParticipant, org.omg.dds.core.policy.QosPolicy.ForDomainParticipantFactory, org.omg.dds.core.policy.QosPolicy.ForPublisher, org.omg.dds.core.policy.QosPolicy.ForSubscriber, org.omg.dds.core.policy.QosPolicy.ForTopic, org.opensplice.dds.core.policy.QosPolicy, org.opensplice.dds.core.policy.QosPolicy.ForView, and org.opensplice.dds.core.policy.QosPolicyImpl.
Classes | |
interface | ForDataReader |
A QosPolicy interface that implements this marker interface applies to org.omg.dds.sub.DataReader Entities. More... | |
interface | ForDataWriter |
A QosPolicy interface that implements this marker interface applies to org.omg.dds.pub.DataWriter Entities. More... | |
interface | ForDomainParticipant |
A QosPolicy interface that implements this marker interface applies to org.omg.dds.domain.DomainParticipant Entities. More... | |
interface | ForDomainParticipantFactory |
A QosPolicy interface that implements this marker interface applies to org.omg.dds.domain.DomainParticipantFactory objects. More... | |
interface | ForPublisher |
A QosPolicy interface that implements this marker interface applies to org.omg.dds.pub.Publisher Entities. More... | |
interface | ForSubscriber |
A QosPolicy interface that implements this marker interface applies to org.omg.dds.sub.Subscriber Entities. More... | |
interface | ForTopic |
A QosPolicy interface that implements this marker interface applies to org.omg.dds.topic.Topic Entities. More... | |
Public Member Functions | |
ServiceEnvironment | getEnvironment () |
This class is the abstract root for all the QoS policies.
It provides the basic mechanism for an application to specify quality of service parameters. All concrete QosPolicy classes derive from this root and include a value whose type depends on the concrete QoS policy.
The type of a QosPolicy value may be atomic, such as an integer or float, or compound (a structure). Compound types are used whenever multiple parameters must be set coherently to define a consistent value for a QosPolicy.
Each org.omg.dds.core.Entity can be configured with a collection of QosPolicy. However, any Entity cannot support any QosPolicy. For instance, a org.omg.dds.domain.DomainParticipant supports different QosPolicy than a org.omg.dds.topic.Topic or a org.omg.dds.pub.Publisher.
QosPolicy can be set when the Entity is created, or modified with the org.omg.dds.core.Entity#setQos(org.omg.dds.core.EntityQos) method. Each QosPolicy in collection list is treated independently from the others. This approach has the advantage of being very extensible. However, there may be cases where several policies are in conflict. Consistency checking is performed each time the policies are modified via the org.omg.dds.core.Entity#setQos(org.omg.dds.core.EntityQos) operation.
When a policy is changed after being set to a given value, it is not required that the new value be applied instantaneously; the Service is allowed to apply it after a transition phase. In addition, some QosPolicy have "immutable" semantics meaning that they can only be specified either at Entity creation time or else prior to calling the org.omg.dds.core.Entity#enable() operation on the Entity.
Objects of this type are immutable.
Properties of QoS Policies
In several cases, for communications to occur properly (or efficiently), a QosPolicy on the publisher side must be compatible with a corresponding policy on the subscriber side. For example, if a org.omg.dds.sub.DataReader requests to receive data reliably while the corresponding org.omg.dds.pub.DataWriter defines a best-effort policy, communication will not happen as requested. To address this issue and maintain the desirable decoupling of publication and subscription as much as possible, the specification for QosPolicy follows the subscriber-requested, publisher-offered pattern. In this pattern, the subscriber side can specify a "requested" value for a particular QosPolicy. The publisher side specifies an "offered" value for that QosPolicy. The Service will then determine whether the value requested by the subscriber side is compatible with what is offered by the publisher side. If the two policies are compatible, then communication will be established. If the two policies are not compatible, the Service will not establish communications between the two org.omg.dds.core.Entity objects and will record this fact by means of the org.omg.dds.core.status.OfferedIncompatibleQosStatus status on the publisher end and org.omg.dds.core.status.RequestedIncompatibleQosStatus status on the subscriber end. The application can detect this fact by means of a listener (e.g. org.omg.dds.sub.DataReaderListener or org.omg.dds.pub.DataWriterListener) or org.omg.dds.core.Conditions.
The QosPolicy objects that need to be set in a compatible manner between the publisher and subscriber ends are indicated by the setting of the "RxO" (Requested/Offered) property:
The "changeable" property determines whether the QosPolicy can be changed after the Entity is enabled. In other words, a policy with "changeable" setting of "NO" is considered "immutable" and can only be specified either at org.omg.dds.core.Entity creation time or else prior to calling the org.omg.dds.core.Entity#enable() operation.
Definition at line 118 of file QosPolicy.java.
|
inherited |
Implemented in org.omg.dds.core.ServiceEnvironment, org.opensplice.dds.sub.ReflectionDataReader< TYPE, OUT_TYPE >, org.opensplice.dds.core.ModifiableTimeImpl, org.opensplice.dds.pub.ReflectionDataWriter< TYPE >, org.opensplice.dds.core.DurationImpl, org.opensplice.dds.topic.ContentFilteredTopicImpl< TYPE >, org.opensplice.dds.sub.ReadConditionImpl< TYPE >, org.opensplice.dds.core.EntityQosImpl< T extends QosPolicy >, org.opensplice.dds.type.TypeSupportImpl< TYPE >, org.opensplice.dds.topic.PublicationBuiltinTopicDataImpl, org.opensplice.dds.topic.SubscriptionBuiltinTopicDataImpl, org.opensplice.dds.topic.TopicBuiltinTopicDataImpl, org.opensplice.dds.domain.DomainParticipantFactoryImpl, org.opensplice.dds.core.QosProviderImpl, org.opensplice.dds.core.status.OfferedIncompatibleQosStatusImpl, org.opensplice.dds.core.status.RequestedIncompatibleQosStatusImpl, org.opensplice.dds.core.InstanceHandleImpl, org.opensplice.dds.core.StatusConditionImpl< T extends Entity<?, ?>, org.opensplice.dds.core.status.LivelinessChangedStatusImpl, org.opensplice.dds.core.status.PublicationMatchedStatusImpl, org.opensplice.dds.core.status.SubscriptionMatchedStatusImpl, org.opensplice.dds.sub.SampleImpl< TYPE >, org.opensplice.dds.core.policy.ShareImpl, org.opensplice.dds.core.status.OfferedDeadlineMissedStatusImpl, org.opensplice.dds.core.status.SampleRejectedStatusImpl, org.opensplice.dds.core.WaitSetImpl, org.opensplice.dds.topic.ParticipantBuiltinTopicDataImpl, org.opensplice.dds.core.status.RequestedDeadlineMissedStatusImpl, org.opensplice.dds.topic.BuiltinTopicKeyImpl, org.opensplice.dds.core.GuardConditionImpl, org.opensplice.dds.core.event.AllDataDisposedEventImpl< TYPE >, org.opensplice.dds.core.policy.QosPolicyCountImpl, org.opensplice.dds.core.status.InconsistentTopicStatusImpl, org.opensplice.dds.core.status.LivelinessLostStatusImpl, org.opensplice.dds.core.status.SampleLostStatusImpl, org.opensplice.dds.core.policy.QosPolicyImpl, org.opensplice.dds.core.status.AllDataDisposedStatusImpl, org.opensplice.dds.core.IllegalArgumentExceptionImpl, org.opensplice.dds.core.InconsistentPolicyExceptionImpl, org.opensplice.dds.core.policy.PolicyFactoryImpl, org.opensplice.dds.core.policy.TypeConsistencyEnforcementImpl, org.opensplice.dds.core.PreconditionNotMetExceptionImpl, org.opensplice.dds.core.AlreadyClosedExceptionImpl, org.opensplice.dds.core.IllegalOperationExceptionImpl, org.opensplice.dds.core.ImmutablePolicyExceptionImpl, org.opensplice.dds.core.NotEnabledExceptionImpl, org.opensplice.dds.core.OutOfResourcesExceptionImpl, org.opensplice.dds.core.DDSExceptionImpl, org.opensplice.dds.core.status.DataAvailableStatusImpl, and org.opensplice.dds.core.status.DataOnReadersStatusImpl.