OpenSplice Java 5 DCPS  v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
DataWriter.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.pub;
20 
21 import java.util.Set;
22 import java.util.concurrent.TimeUnit;
23 import java.util.concurrent.TimeoutException;
24 
25 import org.omg.dds.core.DomainEntity;
26 import org.omg.dds.core.Duration;
29 import org.omg.dds.core.Time;
35 import org.omg.dds.topic.Topic;
36 
37 
86 public interface DataWriter<TYPE>
87 extends DomainEntity<DataWriterListener<TYPE>, DataWriterQos>
88 {
98  public <OTHER> DataWriter<OTHER> cast();
99 
104  public Topic<TYPE> getTopic();
105 
148  public void waitForAcknowledgments(Duration maxWait)
149  throws TimeoutException;
150 
190  public void waitForAcknowledgments(long maxWait, TimeUnit unit)
191  throws TimeoutException;
192 
213 
232 
253 
287 
314  public void assertLiveliness();
315 
354  public Set<InstanceHandle> getMatchedSubscriptions();
355 
395  InstanceHandle subscriptionHandle);
396 
397 
398  // --- Type-specific interface: ------------------------------------------
399 
459  TYPE instanceData) throws TimeoutException;
460 
491  TYPE instanceData,
492  Time sourceTimestamp) throws TimeoutException;
493 
525  TYPE instanceData,
526  long sourceTimestamp,
527  TimeUnit unit) throws TimeoutException;
528 
590  public void unregisterInstance(
591  InstanceHandle handle) throws TimeoutException;
592 
663  public void unregisterInstance(
664  InstanceHandle handle,
665  TYPE instanceData) throws TimeoutException;
666 
712  public void unregisterInstance(
713  InstanceHandle handle,
714  TYPE instanceData,
715  Time sourceTimestamp) throws TimeoutException;
716 
762  public void unregisterInstance(
763  InstanceHandle handle,
764  TYPE instanceData,
765  long sourceTimestamp,
766  TimeUnit unit) throws TimeoutException;
767 
845  public void write(
846  TYPE instanceData) throws TimeoutException;
878  public void write(
879  TYPE instanceData,
880  Time sourceTimestamp) throws TimeoutException;
912  public void write(
913  TYPE instanceData,
914  long sourceTimestamp,
915  TimeUnit unit) throws TimeoutException;
916 
1007  public void write(
1008  TYPE instanceData,
1009  InstanceHandle handle) throws TimeoutException;
1010 
1049  public void write(
1050  TYPE instanceData,
1051  InstanceHandle handle,
1052  Time sourceTimestamp) throws TimeoutException;
1053 
1093  public void write(
1094  TYPE instanceData,
1095  InstanceHandle handle,
1096  long sourceTimestamp,
1097  TimeUnit unit) throws TimeoutException;
1098 
1131  public void dispose(
1132  InstanceHandle instanceHandle) throws TimeoutException;
1133 
1172  public void dispose(
1173  InstanceHandle instanceHandle,
1174  TYPE instanceData) throws TimeoutException;
1175 
1214  public void dispose(
1215  InstanceHandle instanceHandle,
1216  TYPE instanceData,
1217  Time sourceTimestamp) throws TimeoutException;
1218 
1257  public void dispose(
1258  InstanceHandle instanceHandle,
1259  TYPE instanceData,
1260  long sourceTimestamp,
1261  TimeUnit unit) throws TimeoutException;
1262 
1290  public TYPE getKeyValue(TYPE keyHolder, InstanceHandle handle);
1291 
1318  public TYPE getKeyValue(InstanceHandle handle);
1319 
1337  public InstanceHandle lookupInstance(TYPE keyHolder);
1338 
1339 
1340  // --- From Entity: ------------------------------------------------------
1341  @Override
1343 
1344  @Override
1345  public Publisher getParent();
1346 }
This class contains the statistics about the discovered number of org.omg.dds.sub.DataReaders that are compatible with the org.omg.dds.pub.DataWriter to which the Status is attached.
InstanceHandle registerInstance(TYPE instanceData)
This operation informs the Service that the application will be modifying a particular instance...
TYPE getKeyValue(TYPE keyHolder, InstanceHandle handle)
This operation can be used to retrieve the instance key that corresponds to an instance handle...
A StatusCondition object is an immutable object that specifies Condition that is associated with each...
OfferedIncompatibleQosStatus getOfferedIncompatibleQosStatus()
This operation obtains the OfferedIncompatibleQosStatus object of the DataWriter. ...
LivelinessLostStatus getLivelinessLostStatus()
This operation obtains the LivelinessLostStatus object of the DataWriter.
InstanceHandle lookupInstance(TYPE keyHolder)
This operation takes as a parameter an instance and returns a handle that can be used in subsequent o...
public< OTHER > DataWriter< OTHER > cast()
Cast this data writer to the given type, or throw an exception if the cast fails. ...
void unregisterInstance(InstanceHandle handle)
This operation reverses the action of registerInstance(Object).
DomainEntity is the abstract base class for all DCPS entities, except for the org.omg.dds.domain.DomainParticipant.
void assertLiveliness()
This operation manually asserts the liveliness of the DataWriter.
DataWriter allows the application to set the value of the data to be published under a given org...
Definition: DataWriter.java:86
OfferedDeadlineMissedStatus getOfferedDeadlineMissedStatus()
This operation obtains the OfferedDeadlineMissedStatus object of the DataWriter.
void dispose(InstanceHandle instanceHandle)
This operation requests the middleware to delete the data (the actual deletion is postponed until the...
Set< InstanceHandle > getMatchedSubscriptions()
This operation retrieves the list of subscriptions currently "associated" with the DataWriter; that i...
The DCPSSubscription topic communicates the existence of datareaders by means of the SubscriptionBuil...
The liveliness that the org.omg.dds.pub.DataWriter has committed through its org.omg.dds.core.policy.Liveliness was not respected; thus org.omg.dds.sub.DataReader entities will consider the DataWriter as no longer "active.".
PublicationMatchedStatus getPublicationMatchedStatus()
This operation obtains the PublicationMatchedStatus object of the DataWriter.
An opaque handle that can be used to refer to a local or remote entity.
void write(TYPE instanceData)
This operation modifies the value of a data instance.
Topic< TYPE > getTopic()
void waitForAcknowledgments(Duration maxWait)
This operation is intended to be used only if the DataWriter has org.omg.dds.core.policy.Reliability#getKind() set to org.omg.dds.core.policy.Reliability.Kind#RELIABLE.
StatusCondition< DataWriter< TYPE > > getStatusCondition()
A org.omg.dds.core.policy.QosPolicy value was incompatible with what was requested.
A Publisher is the object responsible for the actual dissemination of publications.
Definition: Publisher.java:71
A span of elapsed time expressed with nanosecond precision.
Definition: Duration.java:35
SubscriptionBuiltinTopicData getMatchedSubscriptionData(InstanceHandle subscriptionHandle)
This operation retrieves information on a subscription that is currently "associated" with the DataWr...
Topic is the most basic description of the data to be published and subscribed.
Definition: Topic.java:55
The deadline that the org.omg.dds.pub.DataWriter has committed through its org.omg.dds.core.policy.Deadline was not respected for a specific instance.
A moment in time expressed with nanosecond precision (though not necessarily nanosecond accuracy)...
Definition: Time.java:34