OpenSplice Java 5 DCPS  v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
org.omg.dds.domain.DomainParticipantFactory Class Referenceabstract

The sole purpose of this class is to allow the creation and destruction of org.omg.dds.domain.DomainParticipant objects. More...

Inheritance diagram for org.omg.dds.domain.DomainParticipantFactory:
Inheritance graph
Collaboration diagram for org.omg.dds.domain.DomainParticipantFactory:
Collaboration graph

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...
 

Detailed Description

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.

Member Function Documentation

◆ createParticipant() [1/4]

abstract DomainParticipant org.omg.dds.domain.DomainParticipantFactory.createParticipant ( )
abstract

Create a new participant in the domain with ID 0 having default QoS and no listener.

See also
createParticipant(int)
#createParticipant(int, DomainParticipantQos, DomainParticipantListener, Collection)
Exceptions
org.omg.dds.core.DDSExceptionAn internal error has occurred.
org.omg.dds.core.OutOfResourcesExceptionThe Data Distribution Service ran out of resources to complete this operation.

◆ createParticipant() [2/4]

abstract DomainParticipant org.omg.dds.domain.DomainParticipantFactory.createParticipant ( int  domainId)
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.

Parameters
domainIdThe 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.
Exceptions
org.omg.dds.core.DDSExceptionAn internal error has occurred.
org.omg.dds.core.OutOfResourcesExceptionThe Data Distribution Service ran out of resources to complete this operation.
See also
createParticipant()
#createParticipant(int, DomainParticipantQos, DomainParticipantListener, Collection)
Returns
a new DomainParticipant object

◆ createParticipant() [3/4]

abstract DomainParticipant org.omg.dds.domain.DomainParticipantFactory.createParticipant ( int  domainId,
DomainParticipantQos  qos,
DomainParticipantListener  listener,
Collection< Class<? extends Status >>  statuses 
)
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:

  • OfferedDeadlineMissedStatus
  • OfferedIncompatibleQosStatus
  • LivelinessLostStatus
  • PublicationMatchedStatus
  • RequestedDeadlineMissedStatus
  • RequestedIncompatibleQosStatus
  • SampleRejectedStatus
  • LivelinessChangedStatus
  • DataAvailableStatus
  • SubscriptionMatchedStatus
  • SampleLostStatus
  • InconsistentTopicStatus
Parameters
domainIdThe 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.
qosThe desired QoS policies. If the specified QoS policies are not consistent, the operation will fail and no Subscriber will be created.
listenerThe listener to be attached.
statusesOf which status changes the listener should be notified. A null collection signifies all status changes.
Exceptions
org.omg.dds.core.InconsistentPolicyExceptionif the specified QoS policies are not consistent.
org.omg.dds.core.DDSExceptionAn internal error has occurred.
org.omg.dds.core.OutOfResourcesExceptionThe Data Distribution Service ran out of resources to complete this operation.
See also
createParticipant()
createParticipant(int)
Returns
a new DomainParticipant object

◆ createParticipant() [4/4]

abstract DomainParticipant org.omg.dds.domain.DomainParticipantFactory.createParticipant ( int  domainId,
DomainParticipantQos  qos,
DomainParticipantListener  listener,
Class<? extends Status >...  statuses 
)
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:

  • OfferedDeadlineMissedStatus
  • OfferedIncompatibleQosStatus
  • LivelinessLostStatus
  • PublicationMatchedStatus
  • RequestedDeadlineMissedStatus
  • RequestedIncompatibleQosStatus
  • SampleRejectedStatus
  • LivelinessChangedStatus
  • DataAvailableStatus
  • SubscriptionMatchedStatus
  • SampleLostStatus
  • InconsistentTopicStatus
Parameters
domainIdThe 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.
qosThe desired QoS policies. If the specified QoS policies are not consistent, the operation will fail and no Subscriber will be created.
listenerThe listener to be attached.
statusesOf which status changes the listener should be notified. A null collection signifies all status changes.
Exceptions
org.omg.dds.core.InconsistentPolicyExceptionif the specified QoS policies are not consistent.
org.omg.dds.core.DDSExceptionAn internal error has occurred.
org.omg.dds.core.OutOfResourcesExceptionThe Data Distribution Service ran out of resources to complete this operation.
See also
createParticipant()
createParticipant(int)
Returns
a new DomainParticipant object

◆ getDefaultParticipantQos()

abstract DomainParticipantQos org.omg.dds.domain.DomainParticipantFactory.getDefaultParticipantQos ( )
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.

Returns
the default DomainParticipantQos object
See also
setDefaultParticipantQos(DomainParticipantQos)

◆ getEnvironment()

ServiceEnvironment org.omg.dds.core.DDSObject.getEnvironment ( )
inherited
Returns
the org.omg.dds.core.ServiceEnvironment object that directly or indirectly was used to create this object.

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.

◆ getInstance()

static DomainParticipantFactory org.omg.dds.domain.DomainParticipantFactory.getInstance ( ServiceEnvironment  env)
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.

Parameters
envIdentifies the Service instance to which the object will belong.

Definition at line 65 of file DomainParticipantFactory.java.

◆ getQos()

abstract DomainParticipantFactoryQos org.omg.dds.domain.DomainParticipantFactory.getQos ( )
abstract

This operation returns the value of the DomainParticipantFactory QoS policies.

Returns
a DomainParticipantFactoryQos object
See also
setQos(DomainParticipantFactoryQos)

◆ lookupParticipant()

abstract DomainParticipant org.omg.dds.domain.DomainParticipantFactory.lookupParticipant ( int  domainId)
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.

Parameters
domainIdthe ID of the Domain for which a joining DomainParticipant should be retrieved. This should be the ID as specified in the configuration file.
Returns
a DomainParticipant object

◆ setDefaultParticipantQos()

abstract void org.omg.dds.domain.DomainParticipantFactory.setDefaultParticipantQos ( DomainParticipantQos  qos)
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.

Parameters
qosAn object of the DomainParticipantQos class, which contains the new default DomainParticipantQos for the newly created DomainParticipants.
Exceptions
org.omg.dds.core.InconsistentPolicyExceptionif the resulting policies are not self consistent; in that case, the operation will have no effect.
org.omg.dds.core.DDSExceptionAn internal error has occurred.
org.omg.dds.core.OutOfResourcesExceptionThe Data Distribution Service ran out of resources to complete this operation.
See also
getDefaultParticipantQos()

◆ setQos()

abstract void org.omg.dds.domain.DomainParticipantFactory.setQos ( DomainParticipantFactoryQos  qos)
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.

Parameters
qosMust contain the new set of QosPolicy settings for the DomainParticipantFactory.
Exceptions
org.omg.dds.core.InconsistentPolicyExceptionif the resulting policies are not self consistent; in that case, the operation will have no effect.
org.omg.dds.core.DDSExceptionAn internal error has occurred.
org.omg.dds.core.OutOfResourcesExceptionThe Data Distribution Service ran out of resources to complete this operation.
See also
getQos()

The documentation for this class was generated from the following file: