From 44bd0c07505a6841f4315eedcab0a228a6819852 Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Fri, 16 Nov 2012 15:52:28 +0100 Subject: Added support for proxy-options to IceGrid adapter, replica group and object descriptors --- java/src/IceGridGUI/Application/AdapterEditor.java | 26 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'java/src/IceGridGUI/Application/AdapterEditor.java') diff --git a/java/src/IceGridGUI/Application/AdapterEditor.java b/java/src/IceGridGUI/Application/AdapterEditor.java index 57af6662444..ead80289271 100644 --- a/java/src/IceGridGUI/Application/AdapterEditor.java +++ b/java/src/IceGridGUI/Application/AdapterEditor.java @@ -37,8 +37,8 @@ class AdapterEditor extends CommunicatorChildEditor { AdapterEditor() { - _objects = new ArrayMapField(this, true, "Identity", "Type", "Property"); - _allocatables = new ArrayMapField(this, true, "Identity", "Type", "Property"); + _objects = new ArrayMapField(this, true, "Identity", "Type", "Property", "Proxy Options"); + _allocatables = new ArrayMapField(this, true, "Identity", "Type", "Property", "Proxy Options"); // // Create buttons @@ -151,6 +151,9 @@ class AdapterEditor extends CommunicatorChildEditor + " ssl -h venus.foo.com (accepts SSL connections instead of plain TCP)" + ""); + _proxyOptions.getDocument().addDocumentListener(_updateListener); + _proxyOptions.setToolTipText("The proxy options used for proxies created by the object adapter."); + _description.getDocument().addDocumentListener(_updateListener); _description.setToolTipText("An optional description for this object adapter"); @@ -238,6 +241,10 @@ class AdapterEditor extends CommunicatorChildEditor builder.append(_publishedEndpoints, 3); builder.nextLine(); + builder.append("Proxy Options" ); + builder.append(_proxyOptions, 3); + builder.nextLine(); + builder.append("", _registerProcess); builder.nextLine(); builder.append("", _serverLifetime); @@ -287,6 +294,7 @@ class AdapterEditor extends CommunicatorChildEditor { adapter.removeProperty(_oldName + ".Endpoints"); adapter.removeProperty(_oldName + ".PublishedEndpoints"); + adapter.removeProperty(_oldName + ".ProxyOptions"); _oldName = name; } @@ -302,6 +310,11 @@ class AdapterEditor extends CommunicatorChildEditor adapter.setProperty(name + ".PublishedEndpoints", published.toString().trim()); } + if(!_proxyOptions.getText().trim().isEmpty()) + { + adapter.setProperty(name + ".ProxyOptions", _proxyOptions.getText().trim()); + } + // // Set all objects and allocatables properties // @@ -516,6 +529,10 @@ class AdapterEditor extends CommunicatorChildEditor _publishedEndpoints.setEnabled(isEditable); _publishedEndpoints.setEditable(isEditable); + _proxyOptions.setEnabled(true); + _proxyOptions.setEditable(true); + _proxyOptions.setText(Utils.substitute(adapter.getProperty(oaPrefix + "ProxyOptions"), resolver)); + // // Objects // @@ -549,7 +566,7 @@ class AdapterEditor extends CommunicatorChildEditor for(ObjectDescriptor p : objects) { String k = Ice.Util.identityToString(p.id); - result.put(k, new String[]{p.type, getAdapter().lookupPropertyValue(k)}); + result.put(k, new String[]{p.type, getAdapter().lookupPropertyValue(k),p.proxyOptions}); } return result; } @@ -564,7 +581,7 @@ class AdapterEditor extends CommunicatorChildEditor { Ice.Identity id = Ice.Util.stringToIdentity(p.getKey()); String[] val = p.getValue(); - result.add(new ObjectDescriptor(id, val[0])); + result.add(new ObjectDescriptor(id, val[0], val[2])); } catch(Ice.IdentityParseException ex) { @@ -611,6 +628,7 @@ class AdapterEditor extends CommunicatorChildEditor private JTextField _endpoints = new JTextField(20); private JComboBox _publishedEndpoints = new JComboBox(new Object[]{PUBLISH_ACTUAL}); + private JTextField _proxyOptions = new JTextField(20); private JTextField _currentStatus = new JTextField(20); private JTextField _currentEndpoints = new JTextField(20); -- cgit v1.2.3