RTI Connext Java API
Version 7.0.0
|
<<interface>> Interface to be used by a custom filter of a com.rti.dds.topic.ContentFilteredTopic. More...
Public Member Functions | |
void | writer_attach (ObjectHolder writer_filter_data) |
A writer-side filtering API to create some state that can facilitate filtering on the writer side. More... | |
void | writer_detach (Object writer_filter_data) |
A writer-side filtering API to clean up a previously created state using com.rti.dds.topic.WriterContentFilter.writer_attach. More... | |
void | writer_compile (Object writer_filter_data, ExpressionProperty prop, String expression, StringSeq parameters, TypeCode type_code, String type_class_name, Cookie_t cookie) |
A writer-side filtering API to compile an instance of the content filter according to the filter expression and parameters specified by a matching com.rti.dds.subscription.DataReader. More... | |
CookieSeq | writer_evaluate (Object writer_filter_data, Object sample, FilterSampleInfo meta_data) |
A writer-side filtering API to retrieve a list of DataReaders whose content filters pass the sample. More... | |
void | writer_finalize (Object writer_filter_data, Cookie_t cookie) |
A writer-side filtering API to clean up a previously compiled instance of the content filter. More... | |
![]() | |
void | compile (ObjectHolder new_compile_data, String expression, StringSeq parameters, TypeCode type_code, String type_class_name, Object old_compile_data) |
Compile an instance of the content filter according to the filter expression and parameters of the given data type. More... | |
boolean | evaluate (Object compile_data, Object sample, FilterSampleInfo meta_data) |
Evaluate whether the sample is passing the filter or not according to the sample content. More... | |
void | finalize (Object compile_data) |
A previously compiled instance of the content filter is no longer in use and resources can now be cleaned up. More... | |
<<interface>> Interface to be used by a custom filter of a com.rti.dds.topic.ContentFilteredTopic.
This interface can be implemented by an application-provided class and then registered with the com.rti.dds.domain.DomainParticipant such that samples can be filtered for a com.rti.dds.topic.ContentFilteredTopic with the given filter name.
Note: The API for using a custom content filter is subject to change in a future release.
void writer_attach | ( | ObjectHolder | writer_filter_data | ) |
A writer-side filtering API to create some state that can facilitate filtering on the writer side.
This method is called to create some state required to perform filtering on the writer side using writer-side filtering APIs. This method will be called for every com.rti.dds.publication.DataWriter; it will be called only the first time the com.rti.dds.publication.DataWriter matches a com.rti.dds.subscription.DataReader using the specified filter. This function will not be called for any subsequent DataReaders that match the DataWriter and are using the same filter.
writer_filter_data | <<out>> A user-specified opaque pointer to some state created on the com.rti.dds.publication.DataWriter that will help perform writer-side filtering efficiently. |
void writer_detach | ( | Object | writer_filter_data | ) |
A writer-side filtering API to clean up a previously created state using com.rti.dds.topic.WriterContentFilter.writer_attach.
This method is called to delete any state created using the com.rti.dds.topic.WriterContentFilter.writer_attach function. This method will be called when the com.rti.dds.publication.DataWriter is deleted.
writer_filter_data | <<in>> A pointer to the state created using com.rti.dds.topic.WriterContentFilter.writer_attach. |
void writer_compile | ( | Object | writer_filter_data, |
ExpressionProperty | prop, | ||
String | expression, | ||
StringSeq | parameters, | ||
TypeCode | type_code, | ||
String | type_class_name, | ||
Cookie_t | cookie | ||
) |
A writer-side filtering API to compile an instance of the content filter according to the filter expression and parameters specified by a matching com.rti.dds.subscription.DataReader.
This method is called when the com.rti.dds.publication.DataWriter discovers a com.rti.dds.subscription.DataReader with a com.rti.dds.topic.ContentFilteredTopic or when a com.rti.dds.publication.DataWriter is notified of a change in a DataReader's filter parameter for the locally registered content filter instance.
It is possible for multiple threads to be calling into this function at the same time.
writer_filter_data | <<in>> A pointer to the state created using com.rti.dds.topic.WriterContentFilter.writer_attach . |
prop | <<out>> A pointer to com.rti.dds.topic.ExpressionProperty that allows you to indicate to RTI Connext if a filter expression can be optimized. |
expression | <<in>> An ASCIIZ string with the filter expression. The memory used by this string is owned by RTI Connext and must not be freed. If you want to manipulate this string, you must first make a copy of it. |
parameters | <<in>> A string sequence with the expression parameters with which the com.rti.dds.topic.ContentFilteredTopic was created. The string sequence is equal (but not identical) to the string sequence passed to com.rti.dds.domain.DomainParticipant.create_contentfilteredtopic. Note that the sequence passed to the compile function is owned by RTI Connext and must not be referenced outside the compile function. |
type_code | <<in>> A pointer to the type code for the related com.rti.dds.topic.Topic of the com.rti.dds.topic.ContentFilteredTopic. A type_code is a description of a type in terms of which types it contains (such as long, string, etc.) and the corresponding member field names in the data type structure. The type code can be used to write custom content filters that can be used with any type. This parameter is always NULL in Java. |
type_class_name | <<in>> Fully qualified class name of the related com.rti.dds.topic.Topic. |
cookie | <<in>> com.rti.dds.infrastructure.Cookie_t to uniquely identify com.rti.dds.subscription.DataReader for which com.rti.dds.topic.WriterContentFilter.writer_compile was called. |
One | of the Standard Return Codes |
CookieSeq writer_evaluate | ( | Object | writer_filter_data, |
Object | sample, | ||
FilterSampleInfo | meta_data | ||
) |
A writer-side filtering API to retrieve a list of DataReaders whose content filters pass the sample.
This method is called every time a com.rti.dds.publication.DataWriter writes a new sample. Its purpose is to evaluate the sample for all the readers for which the com.rti.dds.publication.DataWriter is performing writer-side filtering and return the list of com.rti.dds.infrastructure.Cookie_t structures associated with the DataReaders whose filters pass the sample.
It is possible for multiple threads to be calling into this function at the same time
writer_filter_data | <<in>> A pointer to the state created using com.rti.dds.topic.WriterContentFilter.writer_attach . |
sample | <<in>> Pointer to a deserialized sample to be filtered. |
meta_data | <<in>> Pointer to meta data associated with the sample. |
void writer_finalize | ( | Object | writer_filter_data, |
Cookie_t | cookie | ||
) |
A writer-side filtering API to clean up a previously compiled instance of the content filter.
This method is called to notify the filter implementation that the com.rti.dds.publication.DataWriter is no longer matching with a com.rti.dds.subscription.DataReader for which it was previously performing writer-side filtering. This will allow the filter to purge any state it was maintaining for the com.rti.dds.subscription.DataReader.
It is possible for multiple threads to be calling into this function at the same time.
writer_filter_data | <<in>> A pointer to the state created using com.rti.dds.topic.WriterContentFilter.writer_attach. |
cookie | com.rti.dds.infrastructure.Cookie_t to uniquely identify com.rti.dds.subscription.DataReader for which com.rti.dds.topic.WriterContentFilter.writer_finalize was called. |