![]() |
OpenSplice Java 5 DCPS
v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
|
The sole purpose of this class is to allow the creation and destruction of org.omg.dds.domain.DomainParticipant objects. More...
Public Member Functions | |
abstract DomainParticipant | createParticipant () |
Create a new participant in the domain with ID 0 having default QoS and no listener. More... | |
abstract DomainParticipant | createParticipant (int domainId) |
This operation creates a new DomainParticipant object. More... | |
abstract DomainParticipant | createParticipant (int domainId, DomainParticipantQos qos, DomainParticipantListener listener, Collection< Class<? extends Status >> statuses) |
This operation creates a new DomainParticipant object with the specified QoS, listener, and statuses. More... | |
abstract DomainParticipant | createParticipant (int domainId, DomainParticipantQos qos, DomainParticipantListener listener, Class<? extends Status >... statuses) |
This operation creates a new DomainParticipant object with the specified QoS and the specified listener. More... | |
abstract DomainParticipantQos | getDefaultParticipantQos () |
This operation retrieves the default value of the DomainParticipant QoS, that is, the QoS policies which will be used for newly created org.omg.dds.domain.DomainParticipant entities in the case where the QoS policies are defaulted in the createParticipant() operation. More... | |
ServiceEnvironment | getEnvironment () |
abstract DomainParticipantFactoryQos | getQos () |
This operation returns the value of the DomainParticipantFactory QoS policies. More... | |
abstract DomainParticipant | lookupParticipant (int domainId) |
This operation retrieves a previously created DomainParticipant belonging to specified domain ID. More... | |
abstract void | setDefaultParticipantQos (DomainParticipantQos qos) |
This operation sets a default value of the DomainParticipant QoS policies which will be used for newly created org.omg.dds.domain.DomainParticipant entities in the case where the QoS policies are defaulted in the createParticipant() operation. More... | |
abstract void | setQos (DomainParticipantFactoryQos qos) |
This operation sets the value of the DomainParticipantFactory QoS policies. More... | |
Static Public Member Functions | |
static DomainParticipantFactory | getInstance (ServiceEnvironment env) |
This operation returns the per-ServiceEnvironment DomainParticipantFactory singleton. More... | |
The sole purpose of this class is to allow the creation and destruction of org.omg.dds.domain.DomainParticipant objects.
DomainParticipantFactory itself has no factory. It is a pre-existing per-org.omg.dds.core.ServiceEnvironment singleton object that can be accessed by means of the getInstance(ServiceEnvironment) operation.
Example
// Set "serviceClassName" property to OpenSplice implementation
System.setProperty(ServiceEnvironment.IMPLEMENTATION_CLASS_NAME_PROPERTY,
"org.opensplice.dds.core.OsplServiceEnvironment");
// Instantiate a DDS ServiceEnvironment
ServiceEnvironment env = ServiceEnvironment.createInstance(ApplicationClassName.class.getClassLoader());
// Get the DomainParticipantFactory
DomainParticipantFactory dpf = DomainParticipantFactory.getInstance(env);
Definition at line 49 of file DomainParticipantFactory.java.
|
abstract |
Create a new participant in the domain with ID 0 having default QoS and no listener.
org.omg.dds.core.DDSException | An internal error has occurred. |
org.omg.dds.core.OutOfResourcesException | The Data Distribution Service ran out of resources to complete this operation. |
|
abstract |
This operation creates a new DomainParticipant object.
The DomainParticipant signifies that the calling application intends to join the domain identified by the domainId argument.
domainId | The ID of the Domain to which the DomainParticipant is joined. This should be the ID as specified in the configuration file. This will also be applicable for the lookupParticipant and getDomainid operations. |
org.omg.dds.core.DDSException | An internal error has occurred. |
org.omg.dds.core.OutOfResourcesException | The Data Distribution Service ran out of resources to complete this operation. |
|
abstract |
This operation creates a new DomainParticipant object with the specified QoS, listener, and statuses.
The DomainParticipant signifies that the calling application intends to join the domain identified by the domainId argument.
For each communication status, the StatusChangedFlag flag is initially set to false. It becomes true whenever that communication status changes. For each communication status activated in the mask, the associated org.omg.dds.domain.DomainParticipantListener operation is invoked and the communication status is reset to false, as the listener implicitly accesses the status which is passed as a parameter to that operation. The status is reset prior to calling the listener, so if the application calls the get<status_name>Status from inside the listener it will see the status already reset. The following statuses are applicable to the DomainParticipantListener:
domainId | The ID of the Domain to which the DomainParticipant is joined. This should be the ID as specified in the configuration file. This will also be applicable for the lookupParticipant and getDomainid operations. |
qos | The desired QoS policies. If the specified QoS policies are not consistent, the operation will fail and no Subscriber will be created. |
listener | The listener to be attached. |
statuses | Of which status changes the listener should be notified. A null collection signifies all status changes. |
org.omg.dds.core.InconsistentPolicyException | if the specified QoS policies are not consistent. |
org.omg.dds.core.DDSException | An internal error has occurred. |
org.omg.dds.core.OutOfResourcesException | The Data Distribution Service ran out of resources to complete this operation. |
|
abstract |
This operation creates a new DomainParticipant object with the specified QoS and the specified listener.
The DomainParticipant signifies that the calling application intends to join the domain identified by the domainId argument.
For each communication status, the StatusChangedFlag flag is initially set to false. It becomes true whenever that communication status changes. For each communication status activated in the mask, the associated org.omg.dds.domain.DomainParticipantListener operation is invoked and the communication status is reset to false, as the listener implicitly accesses the status which is passed as a parameter to that operation. The status is reset prior to calling the listener, so if the application calls the get<status_name>Status from inside the listener it will see the status already reset. The following statuses are applicable to the DomainParticipantListener:
domainId | The ID of the Domain to which the DomainParticipant is joined. This should be the ID as specified in the configuration file. This will also be applicable for the lookupParticipant and getDomainid operations. |
qos | The desired QoS policies. If the specified QoS policies are not consistent, the operation will fail and no Subscriber will be created. |
listener | The listener to be attached. |
statuses | Of which status changes the listener should be notified. A null collection signifies all status changes. |
org.omg.dds.core.InconsistentPolicyException | if the specified QoS policies are not consistent. |
org.omg.dds.core.DDSException | An internal error has occurred. |
org.omg.dds.core.OutOfResourcesException | The Data Distribution Service ran out of resources to complete this operation. |
|
abstract |
This operation retrieves the default value of the DomainParticipant QoS, that is, the QoS policies which will be used for newly created org.omg.dds.domain.DomainParticipant entities in the case where the QoS policies are defaulted in the createParticipant() operation.
The values retrieved will match the set of values specified on the last successful call to setDefaultParticipantQos(DomainParticipantQos), or else, if the call was never made, the default values identified by the DDS specification.
|
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.
|
static |
This operation returns the per-ServiceEnvironment DomainParticipantFactory singleton.
The operation is idempotent, that is, it can be called multiple times without side effects, and each time it will return a DomainParticipantFactory instance that is equal to the previous results.
env | Identifies the Service instance to which the object will belong. |
Definition at line 65 of file DomainParticipantFactory.java.
|
abstract |
This operation returns the value of the DomainParticipantFactory QoS policies.
|
abstract |
This operation retrieves a previously created DomainParticipant belonging to specified domain ID.
If no such DomainParticipant exists, the operation will return null.
If multiple DomainParticipant entities belonging to that domain ID exist, then the operation will return one of them. It is not specified which one.
domainId | the ID of the Domain for which a joining DomainParticipant should be retrieved. This should be the ID as specified in the configuration file. |
|
abstract |
This operation sets a default value of the DomainParticipant QoS policies which will be used for newly created org.omg.dds.domain.DomainParticipant entities in the case where the QoS policies are defaulted in the createParticipant() operation.
qos | An object of the DomainParticipantQos class, which contains the new default DomainParticipantQos for the newly created DomainParticipants. |
org.omg.dds.core.InconsistentPolicyException | if the resulting policies are not self consistent; in that case, the operation will have no effect. |
org.omg.dds.core.DDSException | An internal error has occurred. |
org.omg.dds.core.OutOfResourcesException | The Data Distribution Service ran out of resources to complete this operation. |
|
abstract |
This operation sets the value of the DomainParticipantFactory QoS policies.
These policies control the behavior of the object, a factory for entities.
Note that despite having QoS, the DomainParticipantFactory is not an org.omg.dds.core.Entity.
qos | Must contain the new set of QosPolicy settings for the DomainParticipantFactory. |
org.omg.dds.core.InconsistentPolicyException | if the resulting policies are not self consistent; in that case, the operation will have no effect. |
org.omg.dds.core.DDSException | An internal error has occurred. |
org.omg.dds.core.OutOfResourcesException | The Data Distribution Service ran out of resources to complete this operation. |