getObjectRequest(Reference @ref) { if (@ref.getInstance().traceLevels().location >= 1) { Instance instance = @ref.getInstance(); System.Text.StringBuilder s = new System.Text.StringBuilder(); s.Append("searching for object by id\nobject = "); s.Append(Ice.Util.identityToString(@ref.getIdentity(), instance.toStringMode())); instance.initializationData().logger.trace(instance.traceLevels().locationCat, s.ToString()); } lock (this) { Request request; if (_objectRequests.TryGetValue(@ref.getIdentity(), out request)) { return(request); } request = new ObjectRequest(this, @ref); _objectRequests.Add(@ref.getIdentity(), request); return(request); } }
private void getEndpointsException(Reference @ref, System.Exception exc) { try { throw exc; } catch (Ice.AdapterNotFoundException ex) { Instance instance = @ref.getInstance(); if (instance.traceLevels().location >= 1) { System.Text.StringBuilder s = new System.Text.StringBuilder(); s.Append("adapter not found\n"); s.Append("adapter = " + @ref.getAdapterId()); instance.initializationData().logger.trace(instance.traceLevels().locationCat, s.ToString()); } Ice.NotRegisteredException e = new Ice.NotRegisteredException(ex); e.kindOfObject = "object adapter"; e.id = @ref.getAdapterId(); throw e; } catch (Ice.ObjectNotFoundException ex) { Instance instance = @ref.getInstance(); if (instance.traceLevels().location >= 1) { System.Text.StringBuilder s = new System.Text.StringBuilder(); s.Append("object not found\n"); s.Append("object = " + Ice.Util.identityToString(@ref.getIdentity(), instance.toStringMode())); instance.initializationData().logger.trace(instance.traceLevels().locationCat, s.ToString()); } Ice.NotRegisteredException e = new Ice.NotRegisteredException(ex); e.kindOfObject = "object"; e.id = Ice.Util.identityToString(@ref.getIdentity(), instance.toStringMode()); throw e; } catch (Ice.NotRegisteredException) { throw; } catch (Ice.LocalException ex) { Instance instance = @ref.getInstance(); if (instance.traceLevels().location >= 1) { System.Text.StringBuilder s = new System.Text.StringBuilder(); s.Append("couldn't contact the locator to retrieve endpoints\n"); if (@ref.getAdapterId().Length > 0) { s.Append("adapter = " + @ref.getAdapterId() + "\n"); } else { s.Append("well-known proxy = " + @ref.ToString() + "\n"); } s.Append("reason = " + ex); instance.initializationData().logger.trace(instance.traceLevels().locationCat, s.ToString()); } throw; } catch (System.Exception) { Debug.Assert(false); } }
private void getEndpointsTrace(Reference @ref, EndpointI[] endpoints, bool cached) { if (endpoints != null && endpoints.Length > 0) { if (cached) { trace("found endpoints in locator table", @ref, endpoints); } else { trace("retrieved endpoints from locator, adding to locator table", @ref, endpoints); } } else { Instance instance = @ref.getInstance(); System.Text.StringBuilder s = new System.Text.StringBuilder(); s.Append("no endpoints configured for "); if (@ref.getAdapterId().Length > 0) { s.Append("adapter\n"); s.Append("adapter = " + @ref.getAdapterId()); } else { s.Append("object\n"); s.Append("object = " + Ice.Util.identityToString(@ref.getIdentity(), instance.toStringMode())); } instance.initializationData().logger.trace(instance.traceLevels().locationCat, s.ToString()); } }