Initialise Comapi client instance.

@param application Application context.
779329
void initialise(@NonNull final Application application, CallbackAdapter adapter, Callback<ComapiClient> callback) {
        this.adapter = adapter;
        adapter.adapt(super.initialise(application, this, adapter), callback);
    }
1314424
public static void initialize(final Context context) {
    if (!initialized.compareAndSet(false, true)) {
      return;
    }

    applicationContext = context.getApplicationContext();

    final String packageName = applicationContext.getPackageName();
    localAppName = packageName;

    final PackageManager manager = applicationContext.getPackageManager();
    try {
      final PackageInfo pkgInfo = manager.getPackageInfo(packageName, 0);
      localAppVersion = pkgInfo.versionName;
    } catch (final NameNotFoundException e) {
      Log.d(TAG, "Failed to get version of application, will not send in device info.");
    }

    Log.d(TAG, "Initialized android SDK");
  }
619637
protected void init(String appId, I_CmsAppUIContext context) {

        m_dialogContext = new ToolbarContext(appId);
        m_appContext = context;
        initContextMenu();
        m_itemsRight.addComponent(m_quickLaunchDropDown);
        m_itemsRight.addComponent(m_userDropDown);
        enableDefaultButtons(true);
    }
1250485
protected void setApplicationObject() {
        try {
            Object app = createApplication();
            context.setAttribute(APP, app);
            initializer.set(app);
        } catch (Error e) {
            LOGGER.log(Level.SEVERE, "Failed to initialize "+getApplicationName(),e);
            initializer.setException(e);
            throw e;
        } catch (RuntimeException e) {
            LOGGER.log(Level.SEVERE, "Failed to initialize "+getApplicationName(),e);
            initializer.setException(e);
            throw e;
        } catch (Exception e) {
            LOGGER.log(Level.SEVERE, "Failed to initialize "+getApplicationName(),e);
            initializer.setException(e);
            throw new Error(e);
        } finally {
            // in case the above catch clauses miss this.
            if (!initializer.isDone())
                initializer.cancel(true);
        }
    }
1097125
@Override
    protected void initializeImpl()
    {
        //setup connection factory
        String className=this.getConfigurationValue(FaxClientSpiConfigurationConstants.CONNECTION_FACTORY_CLASS_NAME_PROPERTY_KEY);
        if(className==null)
        {
            className=HylaFAXClientConnectionFactoryImpl.class.getName();
        }
        this.connectionFactory=this.createHylaFAXClientConnectionFactory(className);
        if(this.connectionFactory==null)
        {
            throw new FaxException("HylaFAX connection factory is not available.");
        }
    }
180072
@Override
    public final void init() throws Exception {
        FxToolkit.init();

        applicationInit();

        PlatformClient.getClientConfiguration().setUncaughtExceptionHandler((Thread thread, Throwable exception) -> {
            PlatformClient.getClientConfiguration().getUiExecutor().execute(() -> {
                Assert.requireNonNull(thread, "thread");
                Assert.requireNonNull(exception, "exception");

                if (connectInProgress.get()) {
                    runtimeExceptionsAtInitialization.add(new DolphinRuntimeException(thread, "Unhandled error in Dolphin Platform background thread", exception));
                } else {
                    onRuntimeError(primaryStage, new DolphinRuntimeException(thread, "Unhandled error in Dolphin Platform background thread", exception));
                }
            });
        });

        try {
            clientContext = createClientContext();
            Assert.requireNonNull(clientContext, "clientContext");

            connectInProgress.set(true);
            clientContext.connect().get(30_000, TimeUnit.MILLISECONDS);
        } catch (ClientInitializationException e) {
            initializationException = e;
        } catch (Exception e) {
            initializationException = new ClientInitializationException("Can not initialize Dolphin Platform Context", e);
        } finally {
            connectInProgress.set(false);
        }
    }
1231674
@Override
    public void initializeApplication(ApplicationDefinition oldAppDef,
                                      ApplicationDefinition appDef) {
        checkServiceState();
        verifyApplicationCFs(oldAppDef, appDef);
    }
615199
public void initComponent(EurekaInstanceConfig config,
                              EurekaClientConfig eurekaConfig, AbstractDiscoveryClientOptionalArgs args) {
        this.eurekaInstanceConfig = config;
        this.eurekaClientConfig = eurekaConfig;
        if (ApplicationInfoManager.getInstance().getInfo() == null) {
            // Initialize application info
            ApplicationInfoManager.getInstance().initComponent(config);
        }
        InstanceInfo info = ApplicationInfoManager.getInstance().getInfo();
        discoveryClient = new DiscoveryClient(info, eurekaConfig, args);
    }
444357
public static void register(Application application, ApptentiveConfiguration configuration) {
		if (application == null) {
			throw new IllegalArgumentException("Application is null");
		}

		if (configuration == null) {
			throw new IllegalArgumentException("Apptentive configuration is null");
		}

		try {
			ApptentiveInternal.createInstance(application, configuration);
		} catch (Exception e) {
			ApptentiveLog.e(e, "Exception while registering Apptentive SDK");
			logException(e);
		}
	}
123267
public void init(Application app, Activity initActivity) {
        HMSAgentLog.d("init");

        if (application != null) {
            application.unregisterActivityLifecycleCallbacks(this);
        }

        application = app;
        setCurActivity(initActivity);
        app.registerActivityLifecycleCallbacks(this);
    }
1169838
private void initializeInstance() {
		this.processHelper = Programs.as(this.jobInstance);

		if (this.launchId == null) {
			this.launchId = UUID.randomUUID();
		}
		this.launchResult = new LaunchResult();
	}
1105866
private static void initialize() throws AsyncException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "initialize");
        }

        capabilities = aio_init(MAX_IDENTIFIERS, AsyncException.class);
        aioInitialized = AIO_INITIALIZED;
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "initialize: " + capabilities);
        }
    }
986363
public void setApplicationMap(final Map<String, Object> applicationMap) {
		JKThreadLocal.setValue(JKContextConstants.APPLICATION_MAP, applicationMap);
	}
118933
@Override
    public void initialize(ConfigurableApplicationContext applicationContext) {
        String activeProfile = System.getProperty("spring.profiles.active");
        if (SpringProfiles.OSGI.equalsIgnoreCase(activeProfile)) {
            LOGGER.info("Running in OSGI environment");
        } else if (SpringProfiles.NON_OSGI.equalsIgnoreCase(activeProfile)) {
            LOGGER.info("Running in a non OSGI environment");
        } else {
            applicationContext.getEnvironment().setActiveProfiles(SpringProfiles.NON_OSGI);
            applicationContext.refresh();
            LOGGER.info("Switched to a non OSGI environment");
        }
    }
416537
public function initFromApplication(ApplicationInterface $application)
    {
        $this->setNodeName(self::NODE_NAME);
        $this->name = $application->getName();
        $this->webappPath = $application->getWebappPath();
        $this->setUuid($this->newUuid());
    }
909449
public static void initialise(AcceptListenerFactory _acceptListenerFactory)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "initialise");

        if (!initialised)
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(tc, "not previously initialised");
            Class clientImpl = instance.getClass();
            Method initialiseMethod;
            try
            {
                initialiseMethod = clientImpl.getMethod("initialise", new Class[] { AcceptListenerFactory.class });
                initialiseMethod.invoke(clientImpl, new Object[] { _acceptListenerFactory });
            } catch (Exception e)
            {
                FFDCFilter.processException
                                (e, "com.ibm.ws.sib.jfapchannel.ServerConnectionManager.{}",
                                 JFapChannelConstants.SRVRCONNMGR_INITIALISE_01);

                // Start D249068.1
                // Ensure the exception we dump to the user is the root exception if it was an
                // InvocationTargetException
                Throwable displayedException = e;
                if (e instanceof InvocationTargetException)
                    displayedException = e.getCause();

                SibTr.error(tc, "EXCP_DURING_INIT_SICJ0003", new Object[] { clientImpl, displayedException });
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                    SibTr.exception(tc, e);
                // End D249068.1
            }
            initialised = true;
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "initialise");
    }
297505
private void initialiseLifecycleObserver(Application application) {
        LifeCycleController.registerLifeCycleObserver(application, new LifecycleListener() {
            @Override
            public void onForegrounded(Context context) {
                for (LifecycleListener listener : lifecycleListeners) {
                    listener.onForegrounded(context);
                }
            }

            @Override
            public void onBackgrounded(Context context) {
                for (LifecycleListener listener : lifecycleListeners) {
                    listener.onBackgrounded(context);
                }
            }
        });
    }