/**
         * <summary>
         * Constructs connection manager.</summary>
         *
         * <param name="clientId">Client ID.</param>
         * <param name="top">Topology.</param>
         * <param name="credentials">Connection credentials.</param>
         * <param name="proto">Connection protocol.</param>
         * <param name="sslCtx">SSL context to enable secured connection or <c>null</c> to use unsecured one.</param>
         * <param name="connectTimeout">TCP connection timeout.</param>
         */
        public GridClientConnectionManager(Guid clientId, GridClientTopology top,
            Object credentials, GridClientProtocol proto, IGridClientSslContext sslCtx, int connectTimeout)
        {
            Dbg.Assert(clientId != null, "clientId != null");
            Dbg.Assert(top != null, "top != null");
            Dbg.Assert(connectTimeout >= 0, "connectTimeout > 0");

            this.clientId = clientId;
            this.credentials = credentials;
            this.top = top;
            this.proto = proto;
            this.sslCtx = sslCtx;
            this.connectTimeout = connectTimeout;
        }
Example #2
0
        /**
         * <summary>
         * Constructs connection manager.</summary>
         *
         * <param name="clientId">Client ID.</param>
         * <param name="top">Topology.</param>
         * <param name="routers">Routers or empty collection to use endpoints from topology info.</param>
         * <param name="credentials">Connection credentials.</param>
         * <param name="proto">Connection protocol.</param>
         * <param name="sslCtx">SSL context to enable secured connection or <c>null</c> to use unsecured one.</param>
         * <param name="connectTimeout">TCP connection timeout.</param>
         */
        public GridClientConnectionManager(Guid clientId, GridClientTopology top, ICollection <IPEndPoint> routers,
                                           Object credentials, GridClientProtocol proto, IGridClientSslContext sslCtx, int connectTimeout)
        {
            Dbg.Assert(clientId != null, "clientId != null");
            Dbg.Assert(top != null, "top != null");
            Dbg.Assert(routers != null, "routers != null");
            Dbg.Assert(connectTimeout >= 0, "connectTimeout > 0");

            this.clientId       = clientId;
            this.credentials    = credentials;
            this.top            = top;
            this.routers        = routers;
            this.proto          = proto;
            this.sslCtx         = sslCtx;
            this.connectTimeout = connectTimeout;
        }