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)); }
internal CreateConnectionCallback(RoutableReference rr, EndpointI[] endpoints, GetConnectionCallback cb) { _rr = rr; _endpoints = endpoints; _callback = cb; }
internal RouterEndpointsCallback(RoutableReference ir, GetConnectionCallback cb) { _ir = ir; _cb = cb; }
internal ConnectionCallback(RoutableReference ir, GetConnectionCallback cb, bool cached) { _ir = ir; _cb = cb; _cached = cached; }