OpenSplice Java 5 DCPS  v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
DataWriterListenerImpl.java
Go to the documentation of this file.
1 /*
2  * Vortex OpenSplice
3  *
4  * This software and documentation are Copyright 2006 to 2024 ADLINK
5  * Technology Limited, its affiliated companies and licensors. All rights
6  * reserved.
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21 package org.opensplice.dds.pub;
22 
23 import java.io.Serializable;
24 
25 import org.omg.dds.pub.DataWriter;
34 
35 import DDS.LivelinessLostStatus;
36 import DDS.OfferedDeadlineMissedStatus;
37 import DDS.OfferedIncompatibleQosStatus;
38 import DDS.PublicationMatchedStatus;
39 
40 public class DataWriterListenerImpl<TYPE> extends
41  Listener<DataWriterListener<TYPE>> implements DDS.DataWriterListener,
42  Serializable {
43  private static final long serialVersionUID = 8422072066415569795L;
44  private final transient DataWriter<TYPE> writer;
45 
48  this(environment, writer, listener, false);
49  }
50 
53  boolean waitUntilInitialised) {
54  super(environment, listener, waitUntilInitialised);
55  this.writer = writer;
56  }
57 
58  @Override
59  public void on_liveliness_lost(DDS.DataWriter arg0,
60  LivelinessLostStatus arg1) {
61  this.waitUntilInitialised();
62  this.listener.onLivelinessLost(new LivelinessLostEventImpl<TYPE>(
63  this.environment, writer, StatusConverter.convert(
64  this.environment, arg1)));
65 
66  }
67 
68  @Override
69  public void on_offered_deadline_missed(DDS.DataWriter arg0,
71  this.waitUntilInitialised();
72  this.listener.onOfferedDeadlineMissed(new OfferedDeadlineMissedEventImpl<TYPE>(
73  this.environment, writer, StatusConverter.convert(
74  this.environment, arg1)));
75 
76  }
77 
78  @Override
79  public void on_offered_incompatible_qos(DDS.DataWriter arg0,
81  this.waitUntilInitialised();
82  this.listener.onOfferedIncompatibleQos(new OfferedIncompatibleQosEventImpl<TYPE>(
83  this.environment, writer, StatusConverter.convert(
84  this.environment, arg1)));
85 
86  }
87 
88  @Override
89  public void on_publication_matched(DDS.DataWriter arg0,
91  this.waitUntilInitialised();
92  this.listener.onPublicationMatched(new PublicationMatchedEventImpl<TYPE>(
93  this.environment, writer, StatusConverter.convert(
94  this.environment, arg1)));
95  }
96 
97 }
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.
void on_offered_deadline_missed(DDS.DataWriter arg0, OfferedDeadlineMissedStatus arg1)
void on_liveliness_lost(DDS.DataWriter arg0, LivelinessLostStatus arg1)
void on_publication_matched(DDS.DataWriter arg0, PublicationMatchedStatus arg1)
static QosPolicyCount [] convert(OsplServiceEnvironment env, DDS.QosPolicyCount[] old)
DataWriterListenerImpl(OsplServiceEnvironment environment, DataWriter< TYPE > writer, DataWriterListener< TYPE > listener)
DataWriter allows the application to set the value of the data to be published under a given org...
Definition: DataWriter.java:86
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.".
void on_offered_incompatible_qos(DDS.DataWriter arg0, OfferedIncompatibleQosStatus arg1)
OsplServiceEnvironment environment
Definition: Listener.java:33
Since a org.omg.dds.pub.DataWriter is a kind of org.omg.dds.core.Entity, it has the ability to have a...
A org.omg.dds.core.policy.QosPolicy value was incompatible with what was requested.
DataWriterListenerImpl(OsplServiceEnvironment environment, DataWriter< TYPE > writer, DataWriterListener< TYPE > listener, boolean waitUntilInitialised)
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.