RTI Connext Java API  Version 5.0.0
TypeConsistencyEnforcementQosPolicy Class Reference

Defines the rules for determining whether the type used to publish a given topic is consistent with that used to subscribe to it. More...

Inheritance diagram for TypeConsistencyEnforcementQosPolicy:
QosPolicy

Public Attributes

TypeConsistencyKind kind
 Type consistency kind.
 
- Public Attributes inherited from QosPolicy
final QosPolicyId_t id
 The ID of this QoS policy.
 
final String policy_name
 The name of this QoS policy.
 

Additional Inherited Members

- Public Member Functions inherited from Struct
abstract boolean equals (Object obj)
 
abstract int hashCode ()
 
String toString ()
 
- Protected Member Functions inherited from Struct
 Struct ()
 
abstract void pull_from_nativeI (long native_status)
 
abstract void push_to_nativeI (long native_status)
 

Detailed Description

Defines the rules for determining whether the type used to publish a given topic is consistent with that used to subscribe to it.

This policy defines a type consistency kind, which allows applications to select from among a set of predetermined behaviors. The following consistency kinds are specified: com.rti.dds.infrastructure.TypeConsistencyKind.TypeConsistencyKind.DISALLOW_TYPE_COERCION and com.rti.dds.infrastructure.TypeConsistencyKind.TypeConsistencyKind.ALLOW_TYPE_COERCION.

The type-consistency-enforcement rules consist of two steps:

Step 1. If both the DataWriter and DataReader specify a TypeObject, it is considered first. If the DataReader allows type coercion, then its type must be assignable from the DataWriter’s type. If the DataReader does not allow type coercion, then its type must be structurally identical to the type of the DataWriter.

Step 2. If either the DataWriter or the DataReader does not provide a TypeObject definition, then the registered type names are examined. The DataReader’s and DataWriter’s registered type names must match exactly, as was true in RTI Connext releases prior to 5.0.0.

If either Step 1 or Step 2 fails, the Topics associated with the DataReader and DataWriter are considered to be inconsistent and the com.rti.dds.topic.InconsistentTopicStatus is updated.

The default enforcement kind is com.rti.dds.infrastructure.TypeConsistencyKind.TypeConsistencyKind.ALLOW_TYPE_COERCION. However, when the middleware is introspecting the built-in topic data declaration of a remote DataReader in order to determine whether it can match with a local DataWriter, if it observes that no TypeConsistencyEnforcementQosPolicy value is provided (as would be the case when communicating with a Service implementation not in conformance with this specification), it assumes a kind of com.rti.dds.infrastructure.TypeConsistencyKind.TypeConsistencyKind.DISALLOW_TYPE_COERCION.

For additional information on type consistency enforcement refer to the Addendum for Extensible Types and the OMG Extensible and Dynamic Topic Types for DDS Specification.

Entity:
com.rti.dds.subscription.DataReader
Properties:
RxO = N/A
Changeable = UNTIL ENABLE

Member Data Documentation

Type consistency kind.

[default] com.rti.dds.infrastructure.TypeConsistencyKind.TypeConsistencyKind.ALLOW_TYPE_COERCION


RTI Connext Java API Version 5.0.0 Copyright © Thu Aug 30 2012 Real-Time Innovations, Inc