diff options
author | beckerdo <beckerdo@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-06 19:47:41 +0000 |
---|---|---|
committer | beckerdo <beckerdo@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-06 19:47:41 +0000 |
commit | 9140002a094c467bde17281ade514183d138b1b8 (patch) | |
tree | 0eb02f40d0711202162d6f3e784cd520b69bf5e5 /branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany | |
parent | 9a7d2baf2bd3445796d2383bc3dae5ca114f24be (diff) |
TUSCANY-2821 Added JMS Binding APIs public Set<String> getOperationNames() and public Object getOperationProperty(String opName, String propName ).
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@741694 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany')
-rw-r--r-- | branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java b/branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java index a3d383b4c5..6c9ba36162 100644 --- a/branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java +++ b/branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.TreeSet; import org.apache.tuscany.sca.assembly.BindingRRB; import org.apache.tuscany.sca.assembly.OperationSelector; @@ -492,6 +493,17 @@ public class JMSBinding implements BindingRRB, PolicySetAttachPoint { properties.put(name, value); } + /** + * Provides key set of operation names in this binding. + * @return a Set<String> of operation names + */ + public Set<String> getOperationNames() { + // Make a defensive copy since key changes affect map, map changes affect keys. + Set<String> opNames = operationProperties.keySet(); + Set<String> opNamesCopy = new TreeSet<String>( opNames ); + return opNamesCopy; + } + public Map<String, Object> getOperationProperties(String opName) { return operationProperties.get(opName); } @@ -505,6 +517,21 @@ public class JMSBinding implements BindingRRB, PolicySetAttachPoint { props.put(propName, value); } + /** + * Provides the value of a property for a given operation + * @param opName is the name of the operation in this binding. + * @param propName is the key name for the property + * @return Object representing the property value for this property name. Returns + * null for non existant operation name or property name. + */ + public Object getOperationProperty(String opName, String propName ) { + Map<String, Object> props = operationProperties.get(opName); + if (props == null) { + return null; + } + return props.get(propName); + } + public boolean hasNativeOperationName(String opName) { return nativeOperationNames.containsKey(opName); } |