21 package org.opensplice.dds.pub;
23 import java.util.Collection;
25 import java.util.concurrent.TimeUnit;
26 import java.util.concurrent.TimeoutException;
58 Collection<Class<? extends Status>> statuses) {
59 super(environment, parent);
64 "Supplied DataWriterQos is null.");
68 "Supplied Topic is null.");
70 DDS.DataWriterQos oldQos;
74 }
catch (ClassCastException e) {
76 "Cannot create DataWriter with non-OpenSplice qos");
79 if (listener != null) {
85 DDS.DataWriter old = this.parent.
getOld().create_datawriter(
98 if (this.listener != null) {
99 this.listener.setInitialised();
107 if (listener != null) {
111 wrapperListener = null;
113 rc = this.
getOld().set_listener(wrapperListener, mask);
115 "DataWriter.setListener() failed.");
117 this.listener = wrapperListener;
127 Collection<Class<? extends Status>> statuses) {
128 this.setListener(listener,
134 Class<? extends Status>... statuses) {
135 this.setListener(listener,
141 return this.reflectionWriter.
getQos();
146 this.reflectionWriter.
setQos(qos);
149 @SuppressWarnings(
"unchecked")
155 }
catch (ClassCastException cce) {
157 "Unable to perform requested cast.");
169 throws TimeoutException {
175 throws TimeoutException {
212 return this.reflectionWriter
218 throws TimeoutException {
219 return this.reflectionWriter.registerInstance(instanceData);
224 Time sourceTimestamp)
throws TimeoutException {
225 return this.reflectionWriter.registerInstance(instanceData,
231 long sourceTimestamp, TimeUnit unit)
throws TimeoutException {
232 return this.reflectionWriter.registerInstance(instanceData,
233 sourceTimestamp, unit);
238 throws TimeoutException {
239 this.reflectionWriter.unregisterInstance(handle);
244 throws TimeoutException {
245 this.reflectionWriter.unregisterInstance(handle, instanceData);
250 Time sourceTimestamp)
throws TimeoutException {
251 this.reflectionWriter.unregisterInstance(handle, instanceData,
257 long sourceTimestamp, TimeUnit unit)
throws TimeoutException {
258 this.reflectionWriter.unregisterInstance(handle, instanceData,
259 sourceTimestamp, unit);
263 public void write(TYPE instanceData)
throws TimeoutException {
269 public void write(TYPE instanceData,
Time sourceTimestamp)
270 throws TimeoutException {
276 public void write(TYPE instanceData,
long sourceTimestamp, TimeUnit unit)
277 throws TimeoutException {
278 this.reflectionWriter.write(instanceData,
new TimeImpl(
284 throws TimeoutException {
285 this.reflectionWriter.write(instanceData, handle);
290 Time sourceTimestamp)
throws TimeoutException {
291 this.reflectionWriter.write(instanceData, handle, sourceTimestamp);
296 long sourceTimestamp, TimeUnit unit)
throws TimeoutException {
297 this.reflectionWriter
298 .write(instanceData, handle, sourceTimestamp, unit);
303 this.reflectionWriter.dispose(instanceHandle, null);
308 throws TimeoutException {
309 this.reflectionWriter.dispose(instanceHandle, instanceData);
314 Time sourceTimestamp)
throws TimeoutException {
315 this.reflectionWriter.dispose(instanceHandle, instanceData,
321 long sourceTimestamp, TimeUnit unit)
throws TimeoutException {
322 this.reflectionWriter.dispose(instanceHandle, instanceData,
323 sourceTimestamp, unit);
328 return this.reflectionWriter.getKeyValue(keyHolder, handle);
333 return this.reflectionWriter.getKeyValue(handle);
338 return this.reflectionWriter.lookupInstance(keyHolder);
343 DDS.StatusCondition oldCondition = this.
getOld().get_statuscondition();
345 if (oldCondition == null) {
354 this.reflectionWriter.writeDispose(instanceData);
360 throws TimeoutException {
361 this.reflectionWriter.writeDispose(instanceData, sourceTimestamp);
366 TimeUnit unit)
throws TimeoutException {
367 this.reflectionWriter.writeDispose(instanceData, sourceTimestamp, unit);
372 throws TimeoutException {
373 this.reflectionWriter.writeDispose(instanceData, handle);
378 Time sourceTimestamp)
throws TimeoutException {
379 this.reflectionWriter.writeDispose(instanceData, handle,
385 long sourceTimestamp, TimeUnit unit)
throws TimeoutException {
386 this.reflectionWriter.writeDispose(instanceData, handle,
387 sourceTimestamp, unit);
OfferedDeadlineMissedStatus getOfferedDeadlineMissedStatus()
SubscriptionBuiltinTopicData getMatchedSubscriptionData(InstanceHandle subscriptionHandle)
This operation retrieves information on a subscription that is currently "associated" with the DataWr...
void writeDispose(TYPE instanceData, InstanceHandle handle)
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.
PublicationMatchedStatus getPublicationMatchedStatus()
This operation obtains the PublicationMatchedStatus object of the DataWriter.
Set< InstanceHandle > getMatchedSubscriptions()
OfferedIncompatibleQosStatus getOfferedIncompatibleQosStatus()
This operation obtains the OfferedIncompatibleQosStatus object of the DataWriter. ...
TYPE getKeyValue(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()
void waitForAcknowledgments(Duration maxWait)
void writeDispose(TYPE instanceData, InstanceHandle handle, Time sourceTimestamp)
InstanceHandle nilHandle()
void dispose(InstanceHandle instanceHandle)
This operation requests the middleware to delete the data (the actual deletion is postponed until the...
void write(TYPE instanceData, Time sourceTimestamp)
This operation performs the same functions as write(Object) except that the application provides the ...
TypeSupport< TYPE > getTypeSupport()
Returns the org.omg.dds.type.TypeSupport used to create this TopicDescription.
void dispose(InstanceHandle instanceHandle, TYPE instanceData)
This operation requests the middleware to delete the data (the actual deletion is postponed until the...
void setQos(DataWriterQos qos)
LivelinessLostStatus getLivelinessLostStatus()
InstanceHandle registerInstance(TYPE instanceData, Time sourceTimestamp)
This operation performs the same function as registerInstance(Object) and can be used instead in the ...
void unregisterInstance(InstanceHandle handle, TYPE instanceData)
This operation reverses the action of registerInstance(Object).
DataWriter allows the application to set the value of the data to be published under a given org...
void write(TYPE instanceData, long sourceTimestamp, TimeUnit unit)
This operation performs the same functions as write(Object) except that the application provides the ...
PublicationMatchedStatus getPublicationMatchedStatus()
void unregisterInstance(InstanceHandle handle, TYPE instanceData, long sourceTimestamp, TimeUnit unit)
This operation performs the same function as unregisterInstance(InstanceHandle, Object) and can be us...
TYPE getKeyValue(TYPE keyHolder, InstanceHandle handle)
This operation can be used to retrieve the instance key that corresponds to an instance handle...
void write(TYPE instanceData, InstanceHandle handle)
This operation modifies the value of a data instance.
The DCPSSubscription topic communicates the existence of datareaders by means of the SubscriptionBuil...
static Set< Class<? extends Status > > convertMask(OsplServiceEnvironment environment, int state)
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.".
Set< InstanceHandle > getMatchedSubscriptions()
This operation retrieves the list of subscriptions currently "associated" with the DataWriter; that i...
void writeDispose(TYPE instanceData, Time sourceTimestamp)
void setListener(DataWriterListener< TYPE > listener, Collection< Class<? extends Status >> statuses)
DataWriterImpl(OsplServiceEnvironment environment, PublisherImpl parent, TopicImpl< TYPE > topic, DataWriterQos qos, DataWriterListener< TYPE > listener, Collection< Class<? extends Status >> statuses)
void unregisterInstance(InstanceHandle handle)
This operation reverses the action of registerInstance(Object).
void setListener(DataWriterListener< TYPE > listener, Class<? extends Status >... statuses)
An opaque handle that can be used to refer to a local or remote entity.
void dispose(InstanceHandle instanceHandle, TYPE instanceData, long sourceTimestamp, TimeUnit unit)
This operation performs the same functions as dispose(InstanceHandle, Object) except that the applica...
static void checkReturnCode(int retCode, OsplServiceEnvironment environment, String message)
StatusCondition< DataWriter< TYPE > > getStatusCondition()
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.
LivelinessLostStatus getLivelinessLostStatus()
This operation obtains the LivelinessLostStatus object of the DataWriter.
InstanceHandle registerInstance(TYPE instanceData)
This operation informs the Service that the application will be modifying a particular instance...
void dispose(InstanceHandle instanceHandle, TYPE instanceData, Time sourceTimestamp)
This operation performs the same functions as dispose(InstanceHandle, Object) except that the applica...
void writeDispose(TYPE instanceData, long sourceTimestamp, TimeUnit unit)
ServiceProviderInterface getSPI()
void assertLiveliness()
This operation manually asserts the liveliness of the DataWriter.
Since a org.omg.dds.pub.DataWriter is a kind of org.omg.dds.core.Entity, it has the ability to have a...
OfferedDeadlineMissedStatus getOfferedDeadlineMissedStatus()
This operation obtains the OfferedDeadlineMissedStatus object of the DataWriter.
void setQos(DataWriterQos qos)
void setListener(DataWriterListener< TYPE > listener)
InstanceHandle lookupInstance(TYPE keyHolder)
This operation takes as a parameter an instance and returns a handle that can be used in subsequent o...
A org.omg.dds.core.policy.QosPolicy value was incompatible with what was requested.
void write(TYPE instanceData)
This operation modifies the value of a data instance.
SubscriptionBuiltinTopicData getMatchedSubscriptionData(InstanceHandle subscriptionHandle)
void writeDispose(TYPE instanceData)
A span of elapsed time expressed with nanosecond precision.
void writeDispose(TYPE instanceData, InstanceHandle handle, long sourceTimestamp, TimeUnit unit)
void write(TYPE instanceData, InstanceHandle handle, long sourceTimestamp, TimeUnit unit)
This operation performs the same function as write(Object, InstanceHandle) except that it also provid...
final transient OsplServiceEnvironment environment
void write(TYPE instanceData, InstanceHandle handle, Time sourceTimestamp)
This operation performs the same function as write(Object, InstanceHandle) except that it also provid...
InstanceHandle registerInstance(TYPE instanceData, long sourceTimestamp, TimeUnit unit)
This operation performs the same function as registerInstance(Object) and can be used instead in the ...
static void throwLastErrorException(OsplServiceEnvironment environment)
void waitForAcknowledgments(long maxWait, TimeUnit unit)
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.
Topic is the most basic description of the data to be published and subscribed.
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.
void unregisterInstance(InstanceHandle handle, TYPE instanceData, Time sourceTimestamp)
This operation performs the same function as unregisterInstance(InstanceHandle, Object) and can be us...
A moment in time expressed with nanosecond precision (though not necessarily nanosecond accuracy)...
Status is the abstract root class for all communication status objects.