From abada90e3f84dc703b8ddc9efcbed8a946fadead Mon Sep 17 00:00:00 2001 From: Bernard Normier Date: Thu, 1 Feb 2007 17:09:49 +0000 Subject: Expanded tabs into spaces --- java/src/IceInternal/RouterInfo.java | 120 +++++++++++++++++------------------ 1 file changed, 60 insertions(+), 60 deletions(-) (limited to 'java/src/IceInternal/RouterInfo.java') diff --git a/java/src/IceInternal/RouterInfo.java b/java/src/IceInternal/RouterInfo.java index c1ebbf8526d..d9e6c6f6839 100644 --- a/java/src/IceInternal/RouterInfo.java +++ b/java/src/IceInternal/RouterInfo.java @@ -21,26 +21,26 @@ public final class RouterInfo synchronized public void destroy() { - _clientEndpoints = new EndpointI[0]; - _serverEndpoints = new EndpointI[0]; - _adapter = null; - _identities.clear(); + _clientEndpoints = new EndpointI[0]; + _serverEndpoints = new EndpointI[0]; + _adapter = null; + _identities.clear(); } public boolean equals(java.lang.Object obj) { - if(this == obj) - { - return true; - } + if(this == obj) + { + return true; + } - if(obj instanceof RouterInfo) - { - return _router.equals(((RouterInfo)obj)._router); - } + if(obj instanceof RouterInfo) + { + return _router.equals(((RouterInfo)obj)._router); + } - return false; + return false; } public Ice.RouterPrx @@ -60,31 +60,31 @@ public final class RouterInfo Ice.ObjectPrx clientProxy = _router.getClientProxy(); if(clientProxy == null) { - // - // If getClientProxy() return nil, use router endpoints. - // - _clientEndpoints = ((Ice.ObjectPrxHelperBase)_router).__reference().getEndpoints(); + // + // If getClientProxy() return nil, use router endpoints. + // + _clientEndpoints = ((Ice.ObjectPrxHelperBase)_router).__reference().getEndpoints(); + } + else + { + clientProxy = clientProxy.ice_router(null); // The client proxy cannot be routed. + + // + // In order to avoid creating a new connection to the + // router, we must use the same timeout as the already + // existing connection. + // + try + { + clientProxy = clientProxy.ice_timeout(_router.ice_getConnection().timeout()); + } + catch(Ice.CollocationOptimizationException ex) + { + // Ignore - collocated router. + } + + _clientEndpoints = ((Ice.ObjectPrxHelperBase)clientProxy).__reference().getEndpoints(); } - else - { - clientProxy = clientProxy.ice_router(null); // The client proxy cannot be routed. - - // - // In order to avoid creating a new connection to the - // router, we must use the same timeout as the already - // existing connection. - // - try - { - clientProxy = clientProxy.ice_timeout(_router.ice_getConnection().timeout()); - } - catch(Ice.CollocationOptimizationException ex) - { - // Ignore - collocated router. - } - - _clientEndpoints = ((Ice.ObjectPrxHelperBase)clientProxy).__reference().getEndpoints(); - } } return _clientEndpoints; @@ -102,7 +102,7 @@ public final class RouterInfo } serverProxy = serverProxy.ice_router(null); // The server proxy cannot be routed. - _serverEndpoints = ((Ice.ObjectPrxHelperBase)serverProxy).__reference().getEndpoints(); + _serverEndpoints = ((Ice.ObjectPrxHelperBase)serverProxy).__reference().getEndpoints(); } return _serverEndpoints; @@ -113,28 +113,28 @@ public final class RouterInfo { assert(proxy != null); - if(!_identities.contains(proxy.ice_getIdentity())) - { - // - // Only add the proxy to the router if it's not already in our local map. - // - Ice.ObjectPrx[] proxies = new Ice.ObjectPrx[1]; - proxies[0] = proxy; - Ice.ObjectPrx[] evictedProxies = _router.addProxies(proxies); - - // - // If we successfully added the proxy to the router, we add it to our local map. - // - _identities.add(proxy.ice_getIdentity()); - - // - // We also must remove whatever proxies the router evicted. - // - for(int i = 0; i < evictedProxies.length; ++i) - { - _identities.remove(evictedProxies[i].ice_getIdentity()); - } - } + if(!_identities.contains(proxy.ice_getIdentity())) + { + // + // Only add the proxy to the router if it's not already in our local map. + // + Ice.ObjectPrx[] proxies = new Ice.ObjectPrx[1]; + proxies[0] = proxy; + Ice.ObjectPrx[] evictedProxies = _router.addProxies(proxies); + + // + // If we successfully added the proxy to the router, we add it to our local map. + // + _identities.add(proxy.ice_getIdentity()); + + // + // We also must remove whatever proxies the router evicted. + // + for(int i = 0; i < evictedProxies.length; ++i) + { + _identities.remove(evictedProxies[i].ice_getIdentity()); + } + } } public synchronized void -- cgit v1.2.3