Init the connection to the rabbitmq server.
334848
def init(self):
        """"""
        if not self.export_enable:
            return None
        try:
            parameters = pika.URLParameters(
                'amqp://' + self.user +
                ':' + self.password +
                '@' + self.host +
                ':' + self.port + '/')
            connection = pika.BlockingConnection(parameters)
            channel = connection.channel()
            return channel
        except Exception as e:
            logger.critical("Connection to rabbitMQ failed : %s " % e)
            return None
1077531
public void init(HttpInboundConnection conn, RequestMessage req) {
        this.request = req;
        this.response = conn.getResponse();
        this.connection = conn;
        this.outStream = new ResponseBody(this.response.getBody());
        this.locale = Locale.getDefault();
    }
1116669
public function init()
    {
        $req = $this;

        $job = $this->job = new \PHPDaemon\Core\ComplexJob(function () use ($req) { // called when job is done
            $req->wakeup(); // wake up the request immediately

        });

        $job('query', function ($name, $job) { // registering job named 'showvar'
            \PHPDaemon\Clients\DNS\Pool::getInstance()->get('phpdaemon.net', function ($response) use ($name, $job) {
                $job->setResult($name, $response);
            });
        });

        $job('resolve', function ($name, $job) { // registering job named 'showvar'
            \PHPDaemon\Clients\DNS\Pool::getInstance()->resolve('phpdaemon.net', function ($ip) use ($name, $job) {
                $job->setResult($name, ['phpdaemon.net resolved to' => $ip]);
            });
        });

        $job(); // let the fun begin

        $this->sleep(5, true); // setting timeout
    }
1143156
public void start() throws IOException {
    server = ServerSocketChannel.open();
    server.configureBlocking(false);
    server.socket().setReuseAddress(true);
    server.socket().bind(new InetSocketAddress(port));

    monitor.add(server, this, SelectionKey.OP_ACCEPT);

    // Print a message when we are waiting to connect manually
    if (manualConnect) {
      System.out.println("Ready to accept connections on port " + port);
    }
  }
17723
def start(self):
        """"""
        if not self.initialized:
            raise Exception("Consumer not initialized (no Producer).")
        producer = self.producer
        context = zmq._Context()
        self.pull = context.socket(zmq.PULL)
        self.push = context.socket(zmq.PUSH)
        self.pull.connect('tcp://%s:%s' % (producer.host, producer.push_port))
        self.push.connect('tcp://%s:%s' % (producer.host, producer.pull_port))
        # TODO: notify the producer that this consumer's ready for work?
        self.listen()
243638
async def init(app, loop):
    """"""
    app.session = aiohttp.ClientSession(loop=loop)  # to make web requests
    app.webhook = Webhook.Async(webhook_url, session=app.session)

    em = Embed(color=0x2ecc71)
    em.set_author('[INFO] Starting Worker')
    em.description = 'Host: {}'.format(socket.gethostname())

    await app.webhook.send(embed=em)
863898
public static void initMBeans() {
		// rq: en général, il y a 2 connecteurs (http et ajp 1.3) définis dans server.xml et donc
		// 2 threadPools et 2 globalRequestProcessors de même nom : http-8080 et jk-8009 (ajp13)
		THREAD_POOLS.clear();
		GLOBAL_REQUEST_PROCESSORS.clear();
		THREAD_POOLS.addAll(MBeansAccessor.getTomcatThreadPools());
		GLOBAL_REQUEST_PROCESSORS.addAll(MBeansAccessor.getTomcatGlobalRequestProcessors());
	}
163973
public synchronized void init(int serverPort)
    {
        if (this.initialized)
        {
            return;
        }

        String hostname = null;

        try
        {
            hostname = InetAddress.getLocalHost().getHostName();
        }
        catch (UnknownHostException ex)
        {
            logger.warn("Get host failed. Use localhost.", ex);
        }

        logger.info("WebSocket server initialize. : HostName={}, Port={}, Path={}, Object={}",
                hostname, serverPort, "/", this.toString());
        this.server = new Server(hostname, serverPort, "/", null, AmLogServerEndPoint.class);
        try
        {
            this.server.start();
        }
        catch (DeploymentException ex)
        {
            logger.warn("WebSocket server initialize failed. Skip initialize.", ex);
        }

        this.initialized = true;
    }
111549
def init(self):
        """"""
        if not self.export_enable:
            return None
        try:
            client = paho.Client(client_id='glances_' + self.hostname,
                                 clean_session=False)
            client.username_pw_set(username=self.user,
                                   password=self.password)
            if self.tls:
                client.tls_set(certs.where())
            client.connect(host=self.host,
                           port=self.port)
            client.loop_start()
            return client
        except Exception as e:
            logger.critical("Connection to MQTT server failed : %s " % e)
            return None
41586
def init_poolmanager(self, connections, maxsize,
                         block=requests.adapters.DEFAULT_POOLBLOCK,
                         **pool_kwargs):
        """"""
        context = create_urllib3_context(ciphers=self.CIPHERS,
                                         ssl_version=ssl.PROTOCOL_TLSv1)
        pool_kwargs['ssl_context'] = context
        return super(TLSv1Adapter, self).init_poolmanager(connections, maxsize,
                                                          block, **pool_kwargs)
691809
def _initialize(self, request):
        """"""

        # Add node information on the first request dispatched on a stream.
        request.node.MergeFrom(self._node)
        request.resource.MergeFrom(self._resource)
        self._initial_request = request

        self._rpc.open()
        self._initialized = True
920946
public function init()
    {
        if ($this->isEnabled()) {
            $this->client = \PHPDaemon\Clients\Valve\Pool::getInstance();
            $this->db = \MongoClient::getInstance();
            $this->servers = $this->db->{$this->config->dbname->value . '.servers'};
        }
    }
684163
def listen_init(self):
        """"""
        self.dispatcher = ObjectDispatch(self)
        self.factory = MsgPackProtocolFactory(self.dispatcher)
        self.server = UnixServer(self.loop, self.factory, self.path)
        self.server.start()
689093
def _setup():
    
    _SOCKET.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
    _SOCKET.bind(('', PORT))
    udp = threading.Thread(target=_listen, daemon=True)
    udp.start()
787396
public ActiveMqQueue<ID, DATA> init() throws Exception {
        if (connectionFactory == null) {
            setConnectionFactory(buildConnectionFactory(), true);
        }

        super.init();

        if (connectionFactory == null) {
            throw new IllegalStateException("ActiveMQ Connection factory is null.");
        }

        return this;
    }
239860
def init_connections(self, no_init=False):
        '''
        
        '''
        success = False
        self.set_valid(False)

        if not no_init:
            if self.zoo_client:
                self.zoo_client.remove_listener(self.state_listener)
                self.old_data = ''
                self.old_pointed = ''

            while not success:
                try:
                    if self.zoo_client is None:
                        self.zoo_client = KazooClient(hosts=self.hosts)
                        self.zoo_client.start()
                    else:
                        # self.zoo_client.stop()
                        self.zoo_client._connection.connection_stopped.set()
                        self.zoo_client.close()
                        self.zoo_client = KazooClient(hosts=self.hosts)
                        self.zoo_client.start()
                except Exception as e:
                    log.error("ZKWatcher Exception: " + e.message)
                    sleep(1)
                    continue

                self.setup()
                success = self.update_file(self.my_file)
                sleep(5)
        else:
            self.setup()
            self.update_file(self.my_file)
1027054
async def init():
    """"""
    global redis_conn  # pylint: disable=global-statement,invalid-name
    conn = await aioredis.create_connection(
        'redis://{}:{}'.format(
            SETTINGS.get('FLOW_EXECUTOR', {}).get('REDIS_CONNECTION', {}).get('host', 'localhost'),
            SETTINGS.get('FLOW_EXECUTOR', {}).get('REDIS_CONNECTION', {}).get('port', 56379)
        ),
        db=int(SETTINGS.get('FLOW_EXECUTOR', {}).get('REDIS_CONNECTION', {}).get('db', 1))
    )
    redis_conn = aioredis.Redis(conn)