21 package org.opensplice.dds.sub;
23 import java.lang.reflect.Field;
24 import java.util.ArrayList;
25 import java.util.Collection;
26 import java.util.List;
47 super(environment, parent, topicDescription);
53 this.topicDescription.
retain();
59 Collection<Class<? extends Status>> statuses) {
60 super(environment, parent, topicDescription);
64 "Supplied DataReaderQos is null.");
66 if (topicDescription == null) {
68 "Supplied TopicDescription is null.");
71 DDS.DataReaderQos oldQos;
75 }
catch (ClassCastException e) {
77 "Cannot create DataReader with non-OpenSplice qos");
80 if (listener != null) {
86 DDS.DataReader old = this.parent.
getOld().create_datareader(
97 this.lastPreallocator = null;
98 this.topicDescription.
retain();
100 if (this.listener != null) {
101 this.listener.setInitialised();
113 return this.reflectionReader;
118 Class<?> sampleSeqHolderClz, Field sampleSeqHolderValueField) {
123 pa = this.lastPreallocator;
127 sampleSeqHolderClz, sampleSeqHolderValueField,
this 128 .getTopicDescription().getTypeSupport()
129 .getType(), samples);
130 this.lastPreallocator = pa;
137 return this.reflectionReader.getKeyValue(keyHolder, handle);
142 return this.reflectionReader.getKeyValue(handle);
147 return this.reflectionReader.lookupInstance(keyHolder);
162 Field sampleSeqHolderValueField, DDS.SampleInfoSeqHolder info) {
164 sampleSeqHolderValueField, info);
Since a org.omg.dds.sub.DataReader is a kind of org.omg.dds.core.Entity, it has the ability to have a...
TYPE getKeyValue(TYPE keyHolder, InstanceHandle handle)
This operation can be used to retrieve the instance key that corresponds to an instance handle...
DDS.TopicDescription getOld()
A Sample represents an atom of data information (i.e., one value for one instance) as returned by a o...
DataReaderImpl(OsplServiceEnvironment environment, SubscriberImpl parent, TopicDescriptionExt< TYPE > topicDescription, DataReaderQos qos, DataReaderListener< TYPE > listener, Collection< Class<? extends Status >> statuses)
boolean takeNextSample(Sample< TYPE > sample)
This operation copies the next, non-previously accessed sample from this DataReader and "removes" it ...
List< Sample< TYPE > > getSampleList()
InstanceHandle lookupInstance(TYPE keyHolder)
This operation takes as a parameter an instance and returns a handle that can be used in subsequent o...
DataReaderImpl(OsplServiceEnvironment environment, SubscriberImpl parent, TopicDescriptionExt< TYPE > topicDescription, DDS.DataReader old)
synchronized PreAllocator< TYPE > getPreAllocator(List< Sample< TYPE >> samples, Class<?> sampleSeqHolderClz, Field sampleSeqHolderValueField)
boolean readNextSample(Sample< TYPE > sample)
This operation copies the next, non-previously accessed sample from this DataReader.
ReflectionDataReader<?, TYPE > getReflectionReader()
static Set< Class<? extends Status > > convertMask(OsplServiceEnvironment environment, int state)
An opaque handle that can be used to refer to a local or remote entity.
TYPE getKeyValue(InstanceHandle handle)
This operation can be used to retrieve the instance key that corresponds to an instance handle...
TypeSupport< TYPE > getTypeSupport()
Returns the org.omg.dds.type.TypeSupport used to create this TopicDescription.
final TopicDescriptionExt< TYPE > topicDescription
final transient OsplServiceEnvironment environment
static void throwLastErrorException(OsplServiceEnvironment environment)
Iterator< TYPE > createIterator(Object sampleSeqHolder, Field sampleSeqHolderValueField, DDS.SampleInfoSeqHolder info)
Status is the abstract root class for all communication status objects.