Package com.tibco.ep.tcs.runtime.config

This package contains all the classes and interfaces that manage TIBCO Cloud Streaming flow and block configuration. Each piece of configuration data has an interface (all starting with "I" in this package) and a builder (all suffixed with "Config" in this package) associated with it. Each builder can build up its associated configuration piecemeal using fluent-style setter methods, or the configuration can be constructed directly from an associated configuration interface (see below), or constructed directly from its external textual representation. The configuration API supports HOCON, JSON, and YAML for external textual representations, all validated against JSON Schema documents.

There are two kinds of top-level configuration: block metadata and flows. Each has an external textual representation as described above. In addition, flows have a TIBCO Streaming managed configuration object representation which itself is derived from the flow's external textual representation. Both the top-level block metadata configuration class and the flow configuration class have constructors from external textual representations that also perform validation against their associated schemas. Interior configuration classes perform no validation of their external representation.

Implementation note: The configuration API uses interfaces to mediate between a flow's managed configuration objects and the flow engine because we don't want the TIBCO Cloud Streaming runtime engine to depend on the configuration project that defines the flow's managed configuration objects. Doing so would force the runtime engine to access those objects in TIBCO Streaming transactions, and prevent the runtime classes from being used outside a node (for example in TIBCO Streaming Studio, in a web services container behind a GUI, or in unit tests that can run directly in Eclipse's JUnit runner). Instead, the managed configuration objects implement their corresponding configuration interfaces and the configuration API converts instances of those interfaces to configuration API objects as needed.

If you want to create block metadata configuration objects, the BlockMetaDataConfigFactory will produce identified blocks from resources after validation, or anonymous blocks from already-validated configuration, or from interfaces.