diff options
author | wjaniszewski <wjaniszewski@13f79535-47bb-0310-9956-ffa450edef68> | 2008-08-03 20:03:45 +0000 |
---|---|---|
committer | wjaniszewski <wjaniszewski@13f79535-47bb-0310-9956-ffa450edef68> | 2008-08-03 20:03:45 +0000 |
commit | 2bf6abaee42cd687a15095274961c6c265ee9326 (patch) | |
tree | c6638c113bd037a8245d1e076cd9ba713b464af6 /java/sca/modules/binding-corba | |
parent | 67615a0c52a827e4efb342dd5cce6be8dd3e3e97 (diff) |
In <binding.corba> added configuration option to allow creating name server by Tuscany, new test scenario in itest/corba.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@682203 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-corba')
3 files changed, 23 insertions, 2 deletions
diff --git a/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/CorbaBinding.java b/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/CorbaBinding.java index 0b79065cc3..bf3bc09461 100644 --- a/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/CorbaBinding.java +++ b/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/CorbaBinding.java @@ -43,4 +43,8 @@ public interface CorbaBinding extends Binding { void setId(String id); String getCorbaname(); + + boolean isProvideNameServer(); + + void setProvideNameServer(boolean provideNameServer); } diff --git a/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingImpl.java b/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingImpl.java index 6afe49717f..167fe50d7b 100644 --- a/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingImpl.java +++ b/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingImpl.java @@ -38,7 +38,8 @@ public class CorbaBindingImpl implements CorbaBinding, PolicySetAttachPoint { private String host; private int port; private String id; - + private boolean provideNameServer; + private List<Intent> requiredIntents = new ArrayList<Intent>(); private List<PolicySet> policySets = new ArrayList<PolicySet>(); private IntentAttachPointType intentAttachPointType; @@ -129,4 +130,12 @@ public class CorbaBindingImpl implements CorbaBinding, PolicySetAttachPoint { return CorbaHostUtils.isValidCorbanameURI(getURI()) ? getURI(): CorbaHostUtils.createCorbanameURI(getHost(), getPort(), getName()); } + public boolean isProvideNameServer() { + return provideNameServer; + } + + public void setProvideNameServer(boolean provideNameServer) { + this.provideNameServer = provideNameServer; + } + } diff --git a/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingProcessor.java b/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingProcessor.java index 53333bd7aa..a7be836437 100644 --- a/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingProcessor.java +++ b/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingProcessor.java @@ -80,11 +80,16 @@ public class CorbaBindingProcessor implements StAXArtifactProcessor<CorbaBinding if (uri != null) { binding.setURI(uri); } + // Read CORBA id String id = reader.getAttributeValue(null, "id"); if (id != null) { binding.setId(id); } + + // Read name server request + String provideNameServer = reader.getAttributeValue(null, "provideNameServer"); + binding.setProvideNameServer("true".equals(provideNameServer) ? true : false); return binding; } @@ -114,7 +119,10 @@ public class CorbaBindingProcessor implements StAXArtifactProcessor<CorbaBinding if (model.getId() != null) { writer.writeAttribute("id", model.getId()); } - + + if (model.isProvideNameServer()) { + writer.writeAttribute("provideNameServer", "true"); + } writer.writeEndElement(); } |