Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per interface protocol toggles #40

Open
eswdd opened this issue Nov 2, 2013 · 1 comment
Open

Per interface protocol toggles #40

eswdd opened this issue Nov 2, 2013 · 1 comment
Labels

Comments

@eswdd
Copy link
Contributor

eswdd commented Nov 2, 2013

So that a particular interface's exposure on a protocol can be enabled/disabled by config params. Related to #32.

@eswdd
Copy link
Contributor Author

eswdd commented Nov 6, 2013

Doco to go with the above required to describe:

         <property name="bindingDescriptors">
-            <util:set>
-                <bean class="com.betfair.cougar.blah.service.v1.rescript.BlahRescriptServiceBindingDescriptor"/>
-                <bean class="com.betfair.cougar.blah.service.v1.soap.BlahSoapServiceBindingDescriptor"/>
-                <bean class="com.betfair.cougar.blah.service.v1.jsonrpc.BlahJsonRpcServiceBindingDescriptor"/>
-            </util:set>
+            <bean class="com.betfair.cougar.util.configuration.Sets" factory-method="fromMap">
+                <constructor-arg>
+                    <util:map id="allEnvironmentServiceBindings">
+                        <entry key="RESCRIPT">
+                            <bean class="com.betfair.cougar.blah.service.v1.rescript.BlahRescriptServiceBindingDescriptor"/>
+                        </entry>
+                        <entry key="SOAP">
+                            <bean class="com.betfair.cougar.blah.service.v1.soap.BlahSoapServiceBindingDescriptor"/>
+                        </entry>
+                        <entry key="JSON-RPC">
+                            <bean class="com.betfair.cougar.blah.service.v1.jsonrpc.BlahJsonRpcServiceBindingDescriptor"/>
+                        </entry>
+                    </util:map>
+                </constructor-arg>
+                <constructor-arg>
+                    <bean class="com.betfair.cougar.util.configuration.Sets" factory-method="fromCommaSeparatedValues">
+                        <constructor-arg value="$BLAH-SERVICE{cougar.cluster.service.registered.binding.descriptors.csv}"/>
+                    </bean>
+                </constructor-arg>
+            </bean>
         </property> 

==== service-defaults.properties#2 (text) ====

@@ -1,2 +1,5 @@
+# Which binding descriptors to register for the blah service 
+(comma-separated list) 
+cougar.cluster.service.registered.binding.descriptors.csv=RESCRIPT,SOAP,JSON-RPC

@eswdd eswdd added the accepted label Jun 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant