Пример #1
0
        getEndpoints(Reference @ref, Reference wellKnownRef, int ttl, GetEndpointsCallback callback)
        {
            Debug.Assert(@ref.isIndirect());
            EndpointI[] endpoints = null;
            bool        cached    = false;

            if ([email protected]())
            {
                endpoints = _table.getAdapterEndpoints(@ref.getAdapterId(), ttl, out cached);
                if (!cached)
                {
                    if (_background && endpoints != null)
                    {
                        getAdapterRequest(@ref).addCallback(@ref, wellKnownRef, ttl, null);
                    }
                    else
                    {
                        getAdapterRequest(@ref).addCallback(@ref, wellKnownRef, ttl, callback);
                        return;
                    }
                }
            }
            else
            {
                Reference r = _table.getObjectReference(@ref.getIdentity(), ttl, out cached);
                if (!cached)
                {
                    if (_background && r != null)
                    {
                        getObjectRequest(@ref).addCallback(@ref, null, ttl, null);
                    }
                    else
                    {
                        getObjectRequest(@ref).addCallback(@ref, null, ttl, callback);
                        return;
                    }
                }

                if (!r.isIndirect())
                {
                    endpoints = r.getEndpoints();
                }
                else if (!r.isWellKnown())
                {
                    getEndpoints(r, @ref, ttl, callback);
                    return;
                }
            }

            Debug.Assert(endpoints != null);
            if (@ref.getInstance().traceLevels().location >= 1)
            {
                getEndpointsTrace(@ref, endpoints, true);
            }
            if (callback != null)
            {
                callback.setEndpoints(endpoints, true);
            }
        }
Пример #2
0
 getEndpoints(Reference @ref, Reference wellKnownRef, int ttl, GetEndpointsCallback callback)
 {
     Debug.Assert(@ref.isIndirect());
     EndpointI[] endpoints = null;
     bool cached = false;
     if([email protected]())
     {
         endpoints = _table.getAdapterEndpoints(@ref.getAdapterId(), ttl, out cached);
         if(!cached)
         {
             if(_background && endpoints != null)
             {
                 getAdapterRequest(@ref).addCallback(@ref, wellKnownRef, ttl, null);
             }
             else
             {
                 getAdapterRequest(@ref).addCallback(@ref, wellKnownRef, ttl, callback);
                 return;
             }
         }
     }
     else
     {
         Reference r = _table.getObjectReference(@ref.getIdentity(), ttl, out cached);
         if(!cached)
         {
             if(_background && r != null)
             {
                 getObjectRequest(@ref).addCallback(@ref, null, ttl, null);
             }
             else
             {
                 getObjectRequest(@ref).addCallback(@ref, null, ttl, callback);
                 return;
             }
         }
         
         if(!r.isIndirect())
         {
             endpoints = r.getEndpoints();
         }
         else if(!r.isWellKnown())
         {
             getEndpoints(r, @ref, ttl, callback);
             return;
         }
     }
     
     Debug.Assert(endpoints != null);
     if(@ref.getInstance().traceLevels().location >= 1)
     {
         getEndpointsTrace(@ref, endpoints, true);
     }
     if(callback != null)
     {
         callback.setEndpoints(endpoints, true);
     }
 }
Пример #3
0
        getEndpoints(Reference reference, Reference wellKnownRef, int ttl, GetEndpointsCallback callback)
        {
            Debug.Assert(reference.isIndirect());
            EndpointI[] endpoints = null;
            bool        cached    = false;

            if (!reference.isWellKnown())
            {
                endpoints = _table.getAdapterEndpoints(reference.getAdapterId(), ttl, out cached);
                if (!cached)
                {
                    if (_background && endpoints != null)
                    {
                        getAdapterRequest(reference).addCallback(reference, wellKnownRef, ttl, null);
                    }
                    else
                    {
                        getAdapterRequest(reference).addCallback(reference, wellKnownRef, ttl, callback);
                        return;
                    }
                }
            }
            else
            {
                Reference r = _table.getObjectReference(reference.getIdentity(), ttl, out cached);
                if (!cached)
                {
                    if (_background && r != null)
                    {
                        getObjectRequest(reference).addCallback(reference, null, ttl, null);
                    }
                    else
                    {
                        getObjectRequest(reference).addCallback(reference, null, ttl, callback);
                        return;
                    }
                }

                if (!r.isIndirect())
                {
                    endpoints = r.getEndpoints();
                }
                else if (!r.isWellKnown())
                {
                    if (reference.getCommunicator().traceLevels().location >= 1)
                    {
                        trace("found adapter for well-known object in locator cache", reference, r);
                    }
                    getEndpoints(r, reference, ttl, callback);
                    return;
                }
            }

            Debug.Assert(endpoints != null);
            if (reference.getCommunicator().traceLevels().location >= 1)
            {
                getEndpointsTrace(reference, endpoints, true);
            }
            if (callback != null)
            {
                callback.setEndpoints(endpoints, true);
            }
        }