Class ChainDefinition
- java.lang.Object
-
- com.softwareag.connectivity.chainmanagers.ChainDefinition
-
public class ChainDefinition extends java.lang.Object
A dynamic chain definition, providing the configuration for each plug-in in a chain. Can be used by a manager to create a chain.This object is not thread-safe so synchronization should be used by the caller if it is to be mutated.
It is possible for a chain manager to modify a chain definition before using it to create a chain, though it is usually recommended to use an existing dynamic chain definition from the configuration without modification instead (that is, except for any string substitutions passed into the createChain call).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ChainDefinition.PluginConfiguration
The name and configuration of a single plug-in in a chain definition.
-
Constructor Summary
Constructors Constructor Description ChainDefinition(java.lang.String chainDefinitionId, java.util.List<ChainDefinition.PluginConfiguration> plugins)
Creates a new chain definition from scratch.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getChainDefinitionId()
java.util.List<ChainDefinition.PluginConfiguration>
getPlugins()
java.util.Map<java.lang.String,java.lang.Object>
getTransportConfig()
java.lang.String
toString()
-
-
-
Constructor Detail
-
ChainDefinition
public ChainDefinition(java.lang.String chainDefinitionId, java.util.List<ChainDefinition.PluginConfiguration> plugins)
Creates a new chain definition from scratch.In most cases a manger will use a chain defined in the configuration using
ChainManagerConstructorParameters.getChainDefinitions()
orAbstractChainManager.getChainDefinition(String)
instead of this constructor.- Parameters:
chainDefinitionId
- Used in logging and error messages. Not null.plugins
- Not null, must contain at least a host and transport plug-in.
-
-
Method Detail
-
getChainDefinitionId
public java.lang.String getChainDefinitionId()
- Returns:
- the identifier used for this dynamic chain in the configuration
-
getPlugins
public java.util.List<ChainDefinition.PluginConfiguration> getPlugins()
- Returns:
- the configuration and name of each plug-in in the chain, starting with the host and ending with the transport. This returns a reference (not a copy), so any changes made to the returned list will affect the chain definition itself.
-
getTransportConfig
public java.util.Map<java.lang.String,java.lang.Object> getTransportConfig()
- Returns:
- the configuration associated with the transport at the end of this chain definition. This is a reference not a copy so any changes made to the returned value will affect the chain definition.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-