diff options
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(); } |