Creates a new collaboration client.
@class
@name orion.collabClient.CollabClient
199449
function CollabClient(editor, inputManager, fileClient, serviceRegistry, commandRegistry, preferences) {
		mCollabFileCommands.createFileCommands(serviceRegistry, commandRegistry, fileClient);
		this.editor = editor;
		this.inputManager = inputManager;
		this.fileClient = fileClient;
		this.preferences = preferences;
		this.textView = this.editor.getTextView();
		var self = this;
		this.collabMode = false;
		this.clientId = '';
		this.clientDisplayedName = '';
		this.fileClient.addEventListener('Changed', self.sendFileOperation.bind(self));
		this.serviceRegistry = serviceRegistry;
		this.editor.addEventListener('InputContentsSet', function(event) {self.viewInstalled.call(self, event);});
		this.editor.addEventListener('TextViewUninstalled', function(event) {self.viewUninstalled.call(self, event);});
		this.projectSessionID = '';
		this.inputManager.addEventListener('InputChanged', function(e) {
			self.onInputChanged(e)
		});
		this.ot = null;
		this.otOrionAdapter = null;
		this.otSocketAdapter = null;
		this.socketReconnectAttempt = 0;
		this.socketIntentionalyClosing = false;
		this.socketPingTimeout = 0;
		this.awaitingClients = false;
		this.collabFileAnnotations = {};
		// Timeout id to indicate whether a delayed update has already been assigned
		this.collabFileAnnotationsUpdateTimeoutId = 0;
		/**
		 * A map of clientid -> peer
		 * @type {Object.<string, CollabPeer>}
		 */
		this.peers = {};
		this.editing = false;
		this.guid = guid;
		// Initialize current project
		var file = this.inputManager.getInput();
		var metadata = this.inputManager.getFileMetadata();
		if (metadata) {
			this.onInputChanged({
				metadata: metadata,
				input: {
					resource: file
				}
			});
		}
	}
842197
function Client(name, password) {

    if (!(this instanceof Client)) {
        return new Client(name, password);
    }

    this.name = name || 'RETS-Connector1/2';
    this.password = password || '';

}
1220067
def add_collaborator(self, login):
        
        resp = False
        if login:
            url = self._build_url('collaborators', login, base_url=self._api)
            resp = self._boolean(self._put(url), 204, 404)
        return resp
45486
public synchronized void createConnection()
    {
        if (scribeClient != null) {
            try {
                connectionRetries.incrementAndGet();
                scribeClient.closeLogger();
                scribeClient.openLogger();
                isClosed.set(false);

                log.info("Connection to Scribe established");
            }
            catch (TTransportException e) {
                log.warn("Unable to connect to Scribe: {}", e.getLocalizedMessage());
                scribeClient.closeLogger();
            }
        }
        else {
            log.warn("Scribe client has not been set up correctly.");
        }
    }
572764
function Client(options) {
  events.EventEmitter.call(this);
  //Unlimited amount of listeners for internal event queues by default
  this.setMaxListeners(0);
  this.options = utils.extend({}, optionsDefault, options);
  //current connection index
  this.connectionIndex = 0;
  //current connection index for prepared queries
  this.prepareConnectionIndex = 0;
  this.preparedQueries = {};
  
  this._createPool();
}
367365
function createClient(redisClientOptions) {
  const client = redis.createClient(redisClientOptions);
  if (!client._options) {
    client._options = redisClientOptions;
  }
  return client;
}
1165317
def new_client
      client = Hurley::Client.new
      client.request_options.query_class = Hurley::Query::Flat
      client.request_options.redirection_limit = 0
      client.header[:user_agent] = user_agent

      client.connection = @connection if @connection
      @request_options.each_pair {|key, value| client.request_options[key] = value } if @request_options
      @ssl_options.each_pair {|key, value| client.ssl_options[key] = value } if @ssl_options

      client
    end
455037
@Override
    protected Client instantiateClient(String persistenceUnit)
    {
        return new MongoDBClient(mongoDB, indexManager, reader, persistenceUnit, externalProperties, clientMetadata,
                kunderaMetadata);
    }
1284706
def create_client(opts = {})
      logger.debug { "Creating GitHub client for user #{user} using token '#{auth_token}'" }

      base_url = opts[:base_url] || base_github_api_url_for_remote

      configure_octokit(:base_url => base_url)

      Octokit::Client.new(:access_token => auth_token)
    end
1367441
private function buildClient()
    {
        $client = $this->getBaseClient();
       
        if (!$this->description) {
            $this->reloadDescription();
        }

        $this->serviceClient = new GuzzleClient(
                $client,
                $this->description,
                array(
                    'emitter'  => $this->baseClient->getEmitter(),
                    'defaults' => $this->settings,
                )
            );
    }
930100
public IClient newClient(Object[] params) throws ClientNotFoundException, ClientRejectedException {
        // derive client id from the connection params or use next
        String id = nextId();
        IClient client = new Client(id, this);
        addClient(id, client);
        return client;
    }
985843
@SneakyThrows
    public RadiusClient newInstance() {
        return new RadiusClient(InetAddress.getByName(this.inetAddress), this.sharedSecret,
            this.authenticationPort, this.accountingPort, this.socketTimeout);
    }
1278972
public JestClient createClient(Map<String, String> config, String defaultIndexName) {
        JestClient client;
        String indexName = config.get("client.index"); //$NON-NLS-1$
        if (indexName == null) {
            indexName = defaultIndexName;
        }
        client = createLocalClient(config, indexName, defaultIndexName);
        return client;
    }
1142083
def add_collaborator(login, options = {})
      ensure_ready!(:authorization)
      url = "collaborators/#{escape(login)}"
      response = connection.put(url, options)
      checked_response_body(response)
    end
1271266
def new
      client = Plaid::Client.new(env: PlaidRails.env,
        client_id: PlaidRails.client_id,
        secret: PlaidRails.secret,
        public_key: PlaidRails.public_key)

      response = client.accounts.get(account_params["access_token"])
      @plaid_accounts = response.accounts
      
    end
595038
@Override
    protected Client instantiateClient(String persistenceUnit)
    {
        return new CouchbaseClient(kunderaMetadata, indexManager, reader, externalProperties, persistenceUnit,
                this.bucket, this.clientMetadata);
    }
522007
public Client<? extends Options, ? extends OptionsBuilder, ? extends RequestBuilder> newClient() {
        if (clientClassName == null) {
            return new DefaultClient();
        } else {
            try {
                return (Client) Thread.currentThread().getContextClassLoader().loadClass(clientClassName).newInstance();
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
    }