diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-05-01 12:43:38 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-05-01 12:43:38 -0230 |
commit | c80bbef52c82989b48570f4449831b7017917982 (patch) | |
tree | 963493c6dafe1ff47310d0f7f58420b2a64ae522 /java/src/Ice/ObjectAdapterI.java | |
parent | Bug 3459 - add rewind/reset to InputStream/OutputStream (diff) | |
download | ice-c80bbef52c82989b48570f4449831b7017917982.tar.bz2 ice-c80bbef52c82989b48570f4449831b7017917982.tar.xz ice-c80bbef52c82989b48570f4449831b7017917982.zip |
Bug 3972 - improve server network tracing
Diffstat (limited to 'java/src/Ice/ObjectAdapterI.java')
-rw-r--r-- | java/src/Ice/ObjectAdapterI.java | 53 |
1 files changed, 34 insertions, 19 deletions
diff --git a/java/src/Ice/ObjectAdapterI.java b/java/src/Ice/ObjectAdapterI.java index fbf8339a3b2..af2ab67572f 100644 --- a/java/src/Ice/ObjectAdapterI.java +++ b/java/src/Ice/ObjectAdapterI.java @@ -1147,31 +1147,46 @@ public final class ObjectAdapterI implements ObjectAdapter // String endpts = _instance.initializationData().properties.getProperty(_name + ".PublishedEndpoints"); java.util.List<IceInternal.EndpointI> endpoints = parseEndpoints(endpts, false); - if(!endpoints.isEmpty()) + if(endpoints.isEmpty()) { - return endpoints; - } + // + // If the PublishedEndpoints property isn't set, we compute the published enpdoints + // from the OA endpoints. + // + for(int i = 0; i < _incomingConnectionFactories.size(); ++i) + { + IceInternal.IncomingConnectionFactory factory = _incomingConnectionFactories.get(i); + endpoints.add(factory.endpoint()); + } - // - // If the PublishedEndpoints property isn't set, we compute the published enpdoints - // from the OA endpoints. - // - for(int i = 0; i < _incomingConnectionFactories.size(); ++i) - { - IceInternal.IncomingConnectionFactory factory = _incomingConnectionFactories.get(i); - endpoints.add(factory.endpoint()); + // + // Expand any endpoints that may be listening on INADDR_ANY to + // include actual addresses in the published endpoints. + // + java.util.List<IceInternal.EndpointI> expandedEndpoints = new java.util.ArrayList<IceInternal.EndpointI>(); + for(IceInternal.EndpointI p : endpoints) + { + expandedEndpoints.addAll(p.expand()); + } + endpoints = expandedEndpoints; } - // - // Expand any endpoints that may be listening on INADDR_ANY to - // include actual addresses in the published endpoints. - // - java.util.List<IceInternal.EndpointI> expandedEndpoints = new java.util.ArrayList<IceInternal.EndpointI>(); - for(IceInternal.EndpointI p : endpoints) + if(_instance.traceLevels().network >= 3) { - expandedEndpoints.addAll(p.expand()); + String s = "published endpoints for object adapter `" + _name + "':\n"; + boolean first = true; + for(IceInternal.EndpointI endpoint : endpoints) + { + if(!first) + { + s += ":"; + } + s += endpoint.toString(); + first = false; + } + _instance.initializationData().logger.trace(_instance.traceLevels().networkCat, s; } - return expandedEndpoints; + return endpoints; } private void |