예제 #1
0
        getRequestHandler(RoutableReference rf, Ice.ObjectPrxHelperBase proxy)
        {
            if(rf.getCollocationOptimized())
            {
                Ice.ObjectAdapter adapter = _instance.objectAdapterFactory().findObjectAdapter(proxy);
                if(adapter != null)
                {
                    return proxy.setRequestHandler__(new CollocatedRequestHandler(rf, adapter));
                }
            }

            bool connect = false;
            ConnectRequestHandler handler;
            if(rf.getCacheConnection())
            {
                lock(this)
                {
                    if(!_handlers.TryGetValue(rf, out handler))
                    {
                        handler = new ConnectRequestHandler(rf, proxy);
                        _handlers.Add(rf, handler);
                        connect = true;
                    }
                }
            }
            else
            {
                handler = new ConnectRequestHandler(rf, proxy);
                connect = true;
            }

            if(connect)
            {
                rf.getConnection(handler);
            }
            return proxy.setRequestHandler__(handler.connect(proxy));
        }
예제 #2
0
 internal CreateConnectionCallback(RoutableReference rr, EndpointI[] endpoints, GetConnectionCallback cb)
 {
     _rr = rr;
     _endpoints = endpoints;
     _callback = cb;
 }
예제 #3
0
 internal RouterEndpointsCallback(RoutableReference ir, GetConnectionCallback cb)
 {
     _ir = ir;
     _cb = cb;
 }
예제 #4
0
 internal ConnectionCallback(RoutableReference ir, GetConnectionCallback cb, bool cached)
 {
     _ir = ir;
     _cb = cb;
     _cached = cached;
 }