Class FlowConfig
- java.lang.Object
-
- com.tibco.ep.tcs.runtime.config.BaseConfig
-
- com.tibco.ep.tcs.runtime.config.FlowConfig
-
public class FlowConfig extends BaseConfig
Configuration describing a TCS flow as a graph of TCS block instances. HOCON-based constructors perform validation against the HOCON flow schema.
-
-
Constructor Summary
Constructors Constructor Description FlowConfig()
Create a new empty flow config object.FlowConfig(IFlow source)
Create a new flow config object from the specified interface source.FlowConfig(com.typesafe.config.Config config, FlowValidationProblemList problems, com.tibco.ep.dtm.configuration.hocon.schema.Validator validator)
Create a new flow config object from HOCON configuration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FlowConfig
addBlockInstance(String instanceID, BlockInstanceConfig blockInstance)
Add a block instance ID and associated config.FlowConfig
addEdge(EdgeConfig edge)
Add a flow edge.protected void
fillMap(Map<String,Object> props)
Add this object's properties to the specified map.Map<String,BlockInstanceConfig>
getBlockInstances()
Return a map of the block instances in a flow, indexed by a block instance identifier unique within the flow.List<EdgeConfig>
getEdges()
Return a list of flow edges connecting block instances.ExportedEndpointsConfig
getExportedEndpoints()
Return exported endpoint information for this flow.IdentificationConfig
getIdentification()
Return identification information for this flow.static String
getIDFromConfig(com.typesafe.config.Config config)
Return an ID for the specified HOCON tree, by looking in its identification key.FlowConfig
setBlockInstances(Map<String,BlockInstanceConfig> blockInstances)
Set a map of the block instances in a flow, indexed by a block instance identifier unique within the flow.FlowConfig
setEdges(List<EdgeConfig> edges)
Set a list of flow edges connecting block instances.FlowConfig
setExportedEndpoints(ExportedEndpointsConfig exportedEndpoints)
Set exported endpoint information for this flow.FlowConfig
setIdentification(IdentificationConfig identification)
Set identification information for this flow.-
Methods inherited from class com.tibco.ep.tcs.runtime.config.BaseConfig
toHOCON
-
-
-
-
Constructor Detail
-
FlowConfig
public FlowConfig()
Create a new empty flow config object.
-
FlowConfig
public FlowConfig(IFlow source)
Create a new flow config object from the specified interface source.
- Parameters:
source
- source flow
-
FlowConfig
public FlowConfig(com.typesafe.config.Config config, FlowValidationProblemList problems, com.tibco.ep.dtm.configuration.hocon.schema.Validator validator)
Create a new flow config object from HOCON configuration. Validate the HOCON against the flow schema; if there are any errors, put them in the problem list and construct an empty flow.
- Parameters:
config
- HOCON representation of the flowproblems
- validation problem list, added to with any validation errorsvalidator
- schema validator
-
-
Method Detail
-
getIdentification
public IdentificationConfig getIdentification()
Return identification information for this flow.
- Returns:
- identification
-
setIdentification
public FlowConfig setIdentification(IdentificationConfig identification)
Set identification information for this flow.
- Parameters:
identification
- identification- Returns:
- this object
-
getExportedEndpoints
public ExportedEndpointsConfig getExportedEndpoints()
Return exported endpoint information for this flow.
- Returns:
- exported endpoints
-
setExportedEndpoints
public FlowConfig setExportedEndpoints(ExportedEndpointsConfig exportedEndpoints)
Set exported endpoint information for this flow.
- Parameters:
exportedEndpoints
- exported endpoints- Returns:
- this object
-
getBlockInstances
public Map<String,BlockInstanceConfig> getBlockInstances()
Return a map of the block instances in a flow, indexed by a block instance identifier unique within the flow.
- Returns:
- block instances
-
setBlockInstances
public FlowConfig setBlockInstances(Map<String,BlockInstanceConfig> blockInstances)
Set a map of the block instances in a flow, indexed by a block instance identifier unique within the flow.
- Parameters:
blockInstances
- block instances- Returns:
- this object
-
addBlockInstance
public FlowConfig addBlockInstance(String instanceID, BlockInstanceConfig blockInstance)
Add a block instance ID and associated config. Neither can be null.
- Parameters:
instanceID
- block instance IDblockInstance
- instance configuration- Returns:
- this object
-
getEdges
public List<EdgeConfig> getEdges()
Return a list of flow edges connecting block instances.
- Returns:
- flow edges
-
setEdges
public FlowConfig setEdges(List<EdgeConfig> edges)
Set a list of flow edges connecting block instances.
- Parameters:
edges
- flow edges- Returns:
- this object
-
addEdge
public FlowConfig addEdge(EdgeConfig edge)
Add a flow edge. Cannot be null.
- Parameters:
edge
- flow edge to add- Returns:
- this object
-
fillMap
protected void fillMap(Map<String,Object> props)
Add this object's properties to the specified map.
- Specified by:
fillMap
in classBaseConfig
- Parameters:
props
- map to fill
-
getIDFromConfig
public static String getIDFromConfig(com.typesafe.config.Config config)
Return an ID for the specified HOCON tree, by looking in its identification key. If no such ID can be found, return null. Makes no assumptions about validity.
- Parameters:
config
- configuration to check- Returns:
- desired block ID, null if none found
-
-