OpenSplice Java 5 DCPS  v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
DomainParticipant.java
Go to the documentation of this file.
1 /* Copyright 2010, Object Management Group, Inc.
2  * Copyright 2010, PrismTech, Inc.
3  * Copyright 2010, Real-Time Innovations, Inc.
4  * All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 package org.omg.dds.domain;
20 
21 import java.util.Collection;
22 import java.util.List;
23 import java.util.Set;
24 import java.util.concurrent.TimeUnit;
25 import java.util.concurrent.TimeoutException;
26 
27 import org.omg.dds.core.Duration;
28 import org.omg.dds.core.Entity;
32 import org.omg.dds.core.Time;
33 import org.omg.dds.core.status.Status;
34 import org.omg.dds.pub.Publisher;
36 import org.omg.dds.pub.PublisherQos;
37 import org.omg.dds.sub.Subscriber;
39 import org.omg.dds.sub.SubscriberQos;
41 import org.omg.dds.topic.MultiTopic;
43 import org.omg.dds.topic.Topic;
47 import org.omg.dds.topic.TopicQos;
48 import org.omg.dds.type.TypeSupport;
50 
51 
52 
90 public interface DomainParticipant
91 extends Entity<DomainParticipantListener, DomainParticipantQos>
92 {
93  // --- Create Publisher: -------------------------------------------------
94 
109  public Publisher createPublisher();
110 
131 
176  public Publisher createPublisher(
177  PublisherQos qos,
178  PublisherListener listener,
179  Collection<Class<? extends Status>> statuses);
180 
225  public Publisher createPublisher(
226  PublisherQos qos,
227  PublisherListener listener,
228  Class<? extends Status>... statuses);
229 
230  // --- Create Subscriber: ------------------------------------------------
231 
245  public Subscriber createSubscriber();
246 
267 
315  SubscriberQos qos,
316  SubscriberListener listener,
317  Collection<Class<? extends Status>> statuses);
318 
369  SubscriberQos qos,
370  SubscriberListener listener,
371  Class<? extends Status>... statuses);
372 
386 
387 
388  // --- Create Topic with implicit TypeSupport: ---------------------------
389 
409  public <TYPE> Topic<TYPE> createTopic(
410  String topicName,
411  Class<TYPE> type);
412 
461  public <TYPE> Topic<TYPE> createTopic(
462  String topicName,
463  Class<TYPE> type,
464  TopicQos qos,
465  TopicListener<TYPE> listener,
466  Collection<Class<? extends Status>> statuses);
467 
516  public <TYPE> Topic<TYPE> createTopic(
517  String topicName,
518  Class<TYPE> type,
519  TopicQos qos,
520  TopicListener<TYPE> listener,
521  Class<? extends Status>... statuses);
522 
523  // --- Create Topic with explicit TypeSupport: ---------------------------
524 
546  public <TYPE> Topic<TYPE> createTopic(
547  String topicName,
548  TypeSupport<TYPE> type);
549 
597  public <TYPE> Topic<TYPE> createTopic(
598  String topicName,
599  TypeSupport<TYPE> type,
600  TopicQos qos,
601  TopicListener<TYPE> listener,
602  Collection<Class<? extends Status>> statuses);
603 
651  public <TYPE> Topic<TYPE> createTopic(
652  String topicName,
653  TypeSupport<TYPE> type,
654  TopicQos qos,
655  TopicListener<TYPE> listener,
656  Class<? extends Status>... statuses);
657 
658  // --- Create Topic with implicit TypeSupport: ---------------------------
659 
682  String topicName,
683  DynamicType type);
684 
735  String topicName,
736  DynamicType type,
737  TopicQos qos,
739  Collection<Class<? extends Status>> statuses);
740 
791  String topicName,
792  DynamicType type,
793  TopicQos qos,
795  Class<? extends Status>... statuses);
796 
797  // --- Create Topic with explicit TypeSupport: ---------------------------
798 
820  String topicName,
821  DynamicType type,
822  TypeSupport<DynamicType> typeSupport);
823 
872  String topicName,
873  DynamicType type,
874  TypeSupport<DynamicType> typeSupport,
875  TopicQos qos,
877  Collection<Class<? extends Status>> statuses);
878 
926  String topicName,
927  DynamicType type,
928  TypeSupport<DynamicType> typeSupport,
929  TopicQos qos,
931  Class<? extends Status>... statuses);
932 
933 
934  // --- Other operations: -------------------------------------------------
935 
965  public <TYPE> Topic<TYPE> findTopic(
966  String topicName,
967  Duration timeout) throws TimeoutException;
968 
999  public <TYPE> Topic<TYPE> findTopic(
1000  String topicName,
1001  long timeout,
1002  TimeUnit unit)
1003  throws TimeoutException;
1004 
1030  public <TYPE> TopicDescription<TYPE> lookupTopicDescription(String name);
1031 
1069  String name,
1070  Topic<? extends TYPE> relatedTopic,
1071  String filterExpression,
1072  List<String> expressionParameters);
1073 
1106  String name,
1107  Topic<? extends TYPE> relatedTopic,
1108  String filterExpression,
1109  String... expressionParameters);
1110 
1133  public <TYPE> MultiTopic<TYPE> createMultiTopic(
1134  String name,
1135  Class<TYPE> type,
1136  String subscriptionExpression,
1137  List<String> expressionParameters);
1138 
1161  public <TYPE> MultiTopic<TYPE> createMultiTopic(
1162  String name,
1163  Class<TYPE> type,
1164  String subscriptionExpression,
1165  String... expressionParameters);
1166 
1188  public <TYPE> MultiTopic<TYPE> createMultiTopic(
1189  String name,
1190  TypeSupport<TYPE> type,
1191  String subscriptionExpression,
1192  List<String> expressionParameters);
1193 
1215  public <TYPE> MultiTopic<TYPE> createMultiTopic(
1216  String name,
1217  TypeSupport<TYPE> type,
1218  String subscriptionExpression,
1219  String... expressionParameters);
1220 
1247  public void closeContainedEntities();
1248 
1281  public void ignoreParticipant(InstanceHandle handle);
1282 
1307  public void ignoreTopic(InstanceHandle handle);
1308 
1332  public void ignorePublication(InstanceHandle handle);
1333 
1356  public void ignoreSubscription(InstanceHandle handle);
1357 
1364  public int getDomainId();
1365 
1385  public void assertLiveliness();
1386 
1401 
1415  public void setDefaultPublisherQos(PublisherQos qos);
1416 
1432 
1446  public void setDefaultSubscriberQos(SubscriberQos qos);
1447 
1461  public TopicQos getDefaultTopicQos();
1462 
1475  public void setDefaultTopicQos(TopicQos qos);
1476 
1491  public Set<InstanceHandle> getDiscoveredParticipants();
1492 
1520  InstanceHandle participantHandle);
1521 
1536  public Set<InstanceHandle> getDiscoveredTopics();
1537 
1565  InstanceHandle topicHandle);
1566 
1581  public boolean containsEntity(InstanceHandle handle);
1582 
1596  public ModifiableTime getCurrentTime(ModifiableTime currentTime);
1597 
1607  public Time getCurrentTime();
1608 
1609 
1610  // --- From Entity: ------------------------------------------------------
1611  @Override
1613 }
The DCPSTopic topic communicates the existence of topics by means of the TopicBuiltinTopicData dataty...
A Subscriber is the object responsible for the actual reception of the data resulting from its subscr...
Definition: Subscriber.java:69
The DomainParticipant object plays several roles:
PublisherQos getDefaultPublisherQos()
This operation retrieves the default value of the Publisher QoS, that is, the QoS policies which will...
A StatusCondition object is an immutable object that specifies Condition that is associated with each...
Set< InstanceHandle > getDiscoveredParticipants()
This operation retrieves the list of DomainParticipants that have been discovered in the domain and t...
TopicQos getDefaultTopicQos()
This operation retrieves the default value of the Topic QoS, that is, the QoS policies which will be ...
public< TYPE > TopicDescription< TYPE > lookupTopicDescription(String name)
This operation gives access to an existing locally-created TopicDescription based on its name...
TopicBuiltinTopicData getDiscoveredTopicData(InstanceHandle topicHandle)
This operation retrieves information on a org.omg.dds.topic.Topic that has been discovered on the net...
Publisher createPublisher()
This operation creates a Publisher with default QoS policies and no PublisherListener.
public< TYPE > Topic< TYPE > findTopic(String topicName, Duration timeout)
This operation gives access to an existing (or ready to exist) enabled Topic, based on its name...
SubscriberQos getDefaultSubscriberQos()
This operation retrieves the default value of the Subscriber QoS, that is, the QoS policies which wil...
void setDefaultTopicQos(TopicQos qos)
This operation sets a default value of the Topic QoS policies, which will be used for newly created o...
void ignorePublication(InstanceHandle handle)
This operation allows an application to instruct the Service to locally ignore a remote publication; ...
An opaque handle that can be used to refer to a local or remote entity.
void ignoreSubscription(InstanceHandle handle)
This operation allows an application to instruct the Service to locally ignore a remote subscription;...
Since a org.omg.dds.sub.Subscriber is a kind of org.omg.dds.core.Entity, it has the ability to have a...
Since org.omg.dds.topic.Topic is a kind of org.omg.dds.core.Entity, it has the ability to have an ass...
int getDomainId()
This operation retrieves the domain ID used to create the DomainParticipant.
boolean containsEntity(InstanceHandle handle)
This operation checks whether or not the given handle represents an org.omg.dds.core.Entity that was created from the DomainParticipant.
public< TYPE > Topic< TYPE > createTopic(String topicName, Class< TYPE > type)
This operation creates a Topic with default QoS policies and no TopicListener.
void ignoreTopic(InstanceHandle handle)
This operation allows an application to instruct the Service to locally ignore a org.omg.dds.topic.Topic.
This class is the abstract base class for all the DCPS objects that support QoS policies, a listener and a status condition.
Definition: Entity.java:36
void assertLiveliness()
This operation manually asserts the liveliness of the DomainParticipant.
MultiTopic is a specialization of TopicDescription that allows subscriptions to combine/filter/rearra...
Definition: MultiTopic.java:73
public< TYPE > ContentFilteredTopic< TYPE > createContentFilteredTopic(String name, Topic<? extends TYPE > relatedTopic, String filterExpression, List< String > expressionParameters)
This operation creates a org.omg.dds.topic.ContentFilteredTopic.
void setDefaultSubscriberQos(SubscriberQos qos)
This operation sets a default value of the Subscriber QoS policies that will be used for newly create...
A Publisher is the object responsible for the actual dissemination of publications.
Definition: Publisher.java:71
ParticipantBuiltinTopicData getDiscoveredParticipantData(InstanceHandle participantHandle)
This operation retrieves information on a DomainParticipant that has been discovered on the network...
TypeSupport is an abstract interface that has to be specialized for each concrete type that will be u...
A span of elapsed time expressed with nanosecond precision.
Definition: Duration.java:35
Subscriber getBuiltinSubscriber()
This operation allows access to the built-in Subscriber.
StatusCondition< DomainParticipant > getStatusCondition()
This operation allows access to the org.omg.dds.core.StatusCondition associated with the Entity...
ContentFilteredTopic is a specialization of TopicDescription that allows for content-based subscripti...
Subscriber createSubscriber()
This operation creates a Subscriber with default QoS policies and no SubscriberListener.
Time getCurrentTime()
This operation returns the current value of the time that the service uses to time stamp data writes ...
Set< InstanceHandle > getDiscoveredTopics()
This operation retrieves the list of org.omg.dds.topic.Topics that have been discovered in the domain...
This interface is the base for org.omg.dds.topic.Topic, org.omg.dds.topic.ContentFilteredTopic, and org.omg.dds.topic.MultiTopic.
Topic is the most basic description of the data to be published and subscribed.
Definition: Topic.java:55
Since a org.omg.dds.pub.Publisher is a kind of org.omg.dds.core.Entity, it has the ability to have a ...
Class that contains information about available DomainParticipants within the system.
void ignoreParticipant(InstanceHandle handle)
This operation allows an application to instruct the Service to locally ignore a remote domain partic...
void setDefaultPublisherQos(PublisherQos qos)
This operation sets a default value of the Publisher QoS policies, which will be used for newly creat...
public< TYPE > MultiTopic< TYPE > createMultiTopic(String name, Class< TYPE > type, String subscriptionExpression, List< String > expressionParameters)
This operation creates a MultiTopic.
A moment in time expressed with nanosecond precision (though not necessarily nanosecond accuracy)...
Definition: Time.java:34
void closeContainedEntities()
This operation deletes all the entities that were created by means of the "create" operations on the ...
Status is the abstract root class for all communication status objects.
Definition: Status.java:41