@@ -169,6 +169,47 @@ public static Expression<VType, Object> channel(String channelName) {
169169 return channel (channelName , cacheLastValue (VType .class ));
170170 }
171171
172+ /**
173+ * An expression that allows to directly send/receive values to/from
174+ * PVReaders/PVWriters. This can be used for testing purpose or to integrate
175+ * data models that do not fit datasources or services.
176+ *
177+ * @param <R> the type to read
178+ * @param <C> the type to collect
179+ * @param <W> the type to write
180+ * @param readCollector the read buffer
181+ * @param writeCollector the write buffer
182+ * @return a new collector expression
183+ */
184+ public static <R , C , W > CollectorExpression <R , C , W > collector (ReadCollector <C , R > readCollector , WriteCollector <W > writeCollector ) {
185+ return new CollectorExpression <>(readCollector , writeCollector );
186+ }
187+
188+ /**
189+ * An expression that allows to directly send/receive values to/from
190+ * PVReaders/PVWriters. This can be used for testing purpose or to integrate
191+ * data models that do not fit datasources or services.
192+ *
193+ * @param <R> the type to read
194+ * @param <C> the type to collect
195+ * @param readCollector the read buffer
196+ * @return a new collector expression
197+ */
198+ public static <R , C > CollectorExpression <R , C , Object > collector (ReadCollector <C , R > readCollector ) {
199+ return collector (readCollector , new WriteCollector <>());
200+ }
201+
202+ /**
203+ * An expression that allows to directly send/receive values to/from
204+ * PVReaders/PVWriters. This can be used for testing purpose or to integrate
205+ * data models that do not fit datasources or services.
206+ *
207+ * @return a new collector expression
208+ */
209+ public static CollectorExpression <VType , VType , Object > collector () {
210+ return collector (cacheLastValue (VType .class ));
211+ }
212+
172213 /**
173214 * The default instance of the general purpose client.
174215 *
0 commit comments