简体   繁体   English

如何在运行时更改导出流的属性?

[英]How can I change the properties of an Export stream at runtime?

The Dynamic application composition topic says that 动态应用程序组成主题表示

Properties can also be added, updated, or removed at runtime, and so can subscriptions. 还可以在运行时添加,更新或删除属性,订阅也可以。 The compile-time properties and subscriptions just serve as initial settings. 编译时属性和订阅仅用作初始设置。

but it doesn't say how to do that. 但没有说明如何做到这一点。 So, how do you do that? 那么,你该怎么做呢?

In the operator that exports the stream, call 在导出流的运算符中,调用

setOutputPortExportProperties({property1_name=value, property2_name=value, ...},
  portNumber);

In the operator that imports the stream, call 在导入流的运算符中,调用

setInputPortImportSubscription(subscription_string, portNumber);

SPL sample project 042_dynamic_import_export_api_at_work provides an example. SPL示例项目042_dynamic_import_export_api_at_work提供了一个示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM