Hi all,
I'm currently working on modifying the LoadBalance endpoint parameters
(algorithm, members) to support parameter injection similar to how SOAP
<https://github.com/n-jay/synapse/blob/61fb9e4da909b00d6da8dfe9fb57a3c0a5892793/modules/core/src/main/java/org/apache/synapse/endpoints/EndpointDefinition.java#L218>
and WSDL
<https://github.com/n-jay/synapse/blob/61fb9e4da909b00d6da8dfe9fb57a3c0a5892793/modules/core/src/main/java/org/apache/synapse/endpoints/WSDLEndpoint.java#L121>
endpoints were amended in my PR <https://github.com/apache/synapse/pull/55>.
You can note that I've used the fetchEnvironmentVariables method in
ConfigUtils
<https://github.com/n-jay/synapse/blob/61fb9e4da909b00d6da8dfe9fb57a3c0a5892793/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/utils/ConfigUtils.java>,
for this purpose in the case of SOAP and WSDL endpoints.
However, you'll also note that fetchEnvironmentVariables
<https://github.com/n-jay/synapse/blob/61fb9e4da909b00d6da8dfe9fb57a3c0a5892793/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/utils/ConfigUtils.java#L26>
currently
takes in a string argument whereas certain parameters deal with custom
types such as LoadBalanceAlgorithm in the setAlgorithm
<https://github.com/apache/synapse/blob/21bd3c960bb0b96cf5e78aa5ad52d782881ed42c/modules/core/src/main/java/org/apache/synapse/endpoints/LoadbalanceEndpoint.java#L267>
method.

Is it recommended that I *overload* the fetchEnvironmentVariables method
for each new type I encounter or is it best if the existing
fetchEnvironmentVariables
method *is **modified* to accommodate multiple types of parameters?

Hoping to get some thoughts on this.
Best
-- 
*Nuwan Jayawardene*
https://www.linkedin.com/m/in/nuwanjaya

Reply via email to