RTI Connext Java API
Version 5.0.0
|
A QoS policy for all com.rti.dds.infrastructure.Entity types that can act as factories for one or more other com.rti.dds.infrastructure.Entity types. More...
Public Attributes | |
boolean | autoenable_created_entities |
Specifies whether the entity acting as a factory automatically enables the instances it creates. | |
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) |
A QoS policy for all com.rti.dds.infrastructure.Entity types that can act as factories for one or more other com.rti.dds.infrastructure.Entity types.
This policy controls the behavior of the com.rti.dds.infrastructure.Entity as a factory for other entities. It controls whether or not child entities are created in the enabled state.
RTI Connext uses a factory design pattern for creating DDS Entities. That is, a parent entity must be used to create child entities. DomainParticipants create Topics, Publishers and Subscribers. Publishers create DataWriters. Subscribers create DataReaders.
By default, a child object is enabled upon creation (initialized and may be actively used). With this QoS policy, a child object can be created in a disabled state. A disabled entity is only partially initialized and cannot be used until the entity is enabled. Note: an entity can only be enabled; it cannot be disabled after it has been enabled.
This QoS policy is useful to synchronize the initialization of DDS Entities. For example, when a com.rti.dds.subscription.DataReader is created in an enabled state, its existence is immediately propagated for discovery and the com.rti.dds.subscription.DataReader object's listener called as soon as data is received. The initialization process for an application may extend beyond the creation of the com.rti.dds.subscription.DataReader, and thus, it may not be desireable for the com.rti.dds.subscription.DataReader to start to receive or process any data until the initialization process is complete. So by creating readers in a disabled state, your application can make sure that no data is received until the rest of the application initialization is complete, and at that time, enable the them.
Note: if an entity is disabled, then all of the child entities it creates will be disabled too, regardless of the setting of this QoS policy. However, enabling a disabled entity will enable all of its children if this QoS policy is set to automatically enable children entities.
This policy is mutable. A change in the policy affects only the entities created after the change, not any previously created entities.
boolean autoenable_created_entities |
Specifies whether the entity acting as a factory automatically enables the instances it creates.
The setting of autoenable_created_entities
to com.rti.dds.infrastructure.true indicates that the factory create_<entity>
operation(s) will automatically invoke the com.rti.dds.infrastructure.Entity.enable operation each time a new com.rti.dds.infrastructure.Entity is created. Therefore, the com.rti.dds.infrastructure.Entity returned by create_<entity>
will already be enabled. A setting of com.rti.dds.infrastructure.false indicates that the com.rti.dds.infrastructure.Entity will not be automatically enabled. Your application will need to call com.rti.dds.infrastructure.Entity.enable itself.
The default setting of autoenable_created_entities
= com.rti.dds.infrastructure.true means that, by default, it is not necessary to explicitly call com.rti.dds.infrastructure.Entity.enable on newly created entities.
[default] com.rti.dds.infrastructure.true