Registers the client application at spring-boot-admin-server.

@return true if successful registration on at least one admin server
322014
public boolean register() {
        Application application = this.applicationFactory.createApplication();
        boolean isRegistrationSuccessful = false;

        for (String adminUrl : this.adminUrls) {
            LongAdder attempt = this.attempts.computeIfAbsent(adminUrl, k -> new LongAdder());
            boolean successful = register(application, adminUrl, attempt.intValue() == 0);

            if (!successful) {
                attempt.increment();
            } else {
                attempt.reset();
                isRegistrationSuccessful = true;
                if (this.registerOnce) {
                    break;
                }
            }
        }

        return isRegistrationSuccessful;
    }
1336510
public function registerMiddleware()
    {
        if (is_array($this->middleware()) && count($this->middleware()))
        {
            $middleware = new Middleware($this);
            return $middleware->add();
        }
        return true;
    }
1344766
ServerSessionContext registerSession(ServerSessionContext session) {
    ServerSessionContext oldSession = clients.remove(session.client());
    if (oldSession != null) {
      sessions.remove(oldSession.id());
    }
    session.setConnection(connections.get(session.client()));
    sessions.put(session.id(), session);
    clients.put(session.client(), session);
    return oldSession;
  }
538979
protected function registerProviders()
    {
        /** @var Container $container */
        $container = $this->getContainer();

        // Register Aliases
        $aliases = (array) $this->get('di.aliases');

        foreach ($aliases as $alias => $target) {
            $container->alias($alias, $target);
        }

        $container->registerServiceProvider(new SystemProvider($this, $this->config));

        $providers = (array) $this->config->get('providers');

        foreach ($providers as $interface => &$provider) {
            if ($provider === false) {
                continue;
            }

            if (is_subclass_of($provider, ServiceProviderInterface::class)) {
                // Handle provider
                if ($provider instanceof ClassMeta || (is_string($provider) && class_exists($provider))) {
                    $provider = $container->newInstance($provider);
                }

                if ($provider === false) {
                    continue;
                }

                $container->registerServiceProvider($provider);

                if ($provider instanceof BootableProviderInterface
                    || method_exists($provider, 'boot')) {
                    $provider->boot($container);
                }
            } else {
                // Handle Service
                if (is_numeric($interface)) {
                    $container->prepareSharedObject($provider);
                } else {
                    $container->bindShared($interface, $provider);
                }
            }
        }

        foreach ($providers as $provider) {
            if ($provider === false) {
                continue;
            }

            if (is_subclass_of($provider, ServiceProviderInterface::class)
                && (
                    $provider instanceof BootableDeferredProviderInterface
                    || method_exists($provider, 'bootDeferred')
                )) {
                $provider->bootDeferred($container);
            }
        }
    }
276449
public static function register()
    {
        self::$list = [];
        //
        self::$list['post'] = !isset($_POST) ?: $_POST;
        self::$list['get'] = !isset($_GET) ?: $_GET;
        self::$list['session'] = !isset($_SESSION) ?: $_SESSION;
        self::$list['cookie'] = !isset($_COOKIE) ?: $_COOKIE;
        self::$list['files'] = !isset($_FILES) ?: $_FILES;
        self::$list['server'] = !isset($_SERVER) ?: $_SERVER;
        self::$list['env'] = !isset($_ENV) ?: $_ENV;
        self::$list['request'] = !isset($_REQUEST) ?: $_REQUEST;
        //
        return self::$list;
    }
618129
public final void register() {
        synchronized (lock) {
            if (serviceRegistration == null) {
                BundleClassResolver resolver = new BundleClassResolver();
                serviceRegistration = bundleContext.registerService(SERVICE_NAMES, resolver, serviceProperties);
            }
        }
    }
453641
protected function registerAdminConfiguration()
    {
        $configurationGroup = AdminConfigurationFacade::add('general')
            ->label('avored-framework::system.configuration.general_title');

        $configurationGroup->addConfiguration('general_site_title')
            ->label('avored-framework::system.configuration.default_site_title')
            ->type('text')
            ->name('general_site_title');

        $configurationGroup->addConfiguration('general_site_description')
            ->label('avored-framework::system.configuration.default_site_description')
            ->type('text')
            ->name('general_site_description');

        $siteCurrencyRepository = new SiteCurrencyRepository;
        $configurationGroup->addConfiguration('general_site_currency')
            ->label('avored-framework::system.configuration.default_site_currency')
            ->type('select')
            ->name('general_site_currency')
            ->options($siteCurrencyRepository);

        $configurationGroup->addConfiguration('general_administrator_email')
            ->label('avored-framework::system.configuration.administrator_email')
            ->type('text')
            ->name('general_administrator_email');

        $configurationGroup->addConfiguration('general_term_condition_page')
            ->label('avored-framework::system.configuration.term_condition_page')
            ->type('select')
            ->name('general_term_condition_page')
            ->options(
                function () {
                    $options = Page::all()->pluck('name', 'id');
                    return $options;
                }
            );

        $configurationGroup->addConfiguration('general_home_page')
            ->label('avored-framework::system.configuration.home_page')
            ->type('select')
            ->name('general_home_page')
            ->options(
                function () {
                    return Page::all()->pluck('name', 'id');
                }
            );

        $userGroup = AdminConfigurationFacade::add('users')
            ->label('avored-framework::system.configuration.user_title');

        $userGroup->addConfiguration('user_default_country')
            ->label('avored-framework::system.configuration.user_default_country')
            ->type('select')
            ->name('user_default_country')
            ->options(
                function () {
                    return Country::all()->pluck('name', 'id');
                }
            );

        $userGroup->addConfiguration('user_activation_required')
            ->label('avored-framework::system.configuration.user_activation_required')
            ->type('select')
            ->name('user_activation_required')
            ->options(
                function () {
                    return [0 => 'No', 1 => 'Yes'];
                }
            );

        $userGroup->addConfiguration('user_delete_request_days')
            ->label('avored-framework::system.configuration.user_delete_request_days')
            ->type('text')
            ->name('user_delete_request_days');

        $shippingGroup = AdminConfigurationFacade::add('shipping')
            ->label('avored-framework::system.configuration.shipping_title');

        $shippingGroup->addConfiguration('shipping_free_shipping_enabled')
            ->label('avored-framework::system.configuration.is_free_shipping_enabled')
            ->type('select')
            ->name('shipping_free_shipping_enabled')
            ->options(
                function () {
                    return [1 => 'Yes', 0 => 'No'];
                }
            );

        $paymentGroup = AdminConfigurationFacade::add('payment')
            ->label('avored-framework::system.configuration.payment_title');

        $paymentGroup->addConfiguration('payment_stripe_enabled')
            ->label('avored-framework::system.configuration.payment_stripe_enabled')
            ->type('select')
            ->name('payment_stripe_enabled')
            ->options(
                function () {
                    return [0 => 'No', 1 => 'Yes'];
                }
            );

        $paymentGroup->addConfiguration('payment_stripe_publishable_key')
            ->label('avored-framework::system.configuration.payment_stripe_publishable_key')
            ->type('text')
            ->name('payment_stripe_publishable_key');

        $paymentGroup->addConfiguration('avored_stripe_secret_key')
            ->label('avored-framework::system.configuration.payment_stripe_secret_key')
            ->type('text')
            ->name('avored_stripe_secret_key');

        $taxGroup = AdminConfigurationFacade::add('tax')
            ->label('avored-framework::system.configuration.tax_title');

        $taxGroup->addConfiguration('tax_enabled')
            ->label('avored-framework::system.configuration.is_tax_enabled')
            ->type('select')
            ->name('tax_enabled')
            ->options(
                function () {
                    return [1 => 'Yes', 0 => 'No'];
                }
            );

        $taxGroup->addConfiguration('tax_percentage')
            ->label('avored-framework::system.configuration.tax_percentage')
            ->type('text')
            ->name('tax_percentage');

        $taxGroup->addConfiguration('tax_default_country')
            ->label('avored-framework::system.configuration.tax_default_country')
            ->type('select')
            ->name('tax_default_country')
            ->options(
                function () {
                    return $options = Country::all()->pluck('name', 'id');
                }
            );
    }
156642
public void register() {
        if (registration != null) {
            throw new IllegalStateException("Webapplication is already registered.");
        }
        validateNotNull(applicationName, "applicationName");
        validateNotNull(mountPoint, "mountPoint");
        Hashtable<String, Object> props = new Hashtable<String, Object>();
        props.put(Constants.APPLICATION_NAME, applicationName);
        props.put(Constants.MOUNTPOINT, mountPoint);
        props.put(Constants.CONTEXT_PARAMS, contextParam);
        registration = bundleContext.registerService(WebApplicationFactory.class, this, props);
    }
812392
public function register()
    {
        $this->registered = true;

        return $this->registrar->register(
            $this->name, $this->controller, $this->options
        );
    }
171382
public static void registerMbean(MBeanServer server, ModelMBean mbean, ObjectName name) {
        try {
            synchronized(LOCK) {
                if(server.isRegistered(name))
                    JmxUtils.unregisterMbean(server, name);
                server.registerMBean(mbean, name);
            }
        } catch(Exception e) {
            logger.error("Error registering mbean:", e);
        }
    }
1210898
boolean registerEndpoint(String addr, Endpoint endpoint)
    {
        endpointsSync.lock();

        Endpoint inserted = null;
        try {
            inserted = endpoints.put(addr, endpoint);
        }
        finally {
            endpointsSync.unlock();
        }
        if (inserted != null) {
            return false;
        }
        return true;
    }
1021062
public function register() {
        foreach(Boot::$configs as $path_config => $is_deploy) {
            $path_config = str_replace('\\', '/', $path_config);
            $files       = rglob('*.php', 0, $path_config);
            
            foreach($files as $path) {
                $path = str_replace('\\', '/', $path);
                //                dump($path);
                $file = ltrim(str_replace([$path_config], [''], $path), '/');
                
                $key    = str_replace(['.php', '/',], ['', '.'], $file);
                $config = app('config')->get($key, []);
                //                dd($path, require $path);
                //                dump(require $path, $config, array_merge(require $path, $config));
                app('config')->set($key, array_merge(require $path, $config));
                if($is_deploy) {
                    $this->publishes([$path => config_path($file),], 'config');
                }
            }
        }
        foreach(Boot::$migrations as $path) {
            $this->publishes([
                $path => base_path('database/migrations'),
            ], 'migrations');
        }
    }
860754
void registerDestination()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "registerDestination");

        // Dont register temporary destinations or system destinations.
        if (!isTemporary() && !_isSystem)
        {
            getLocalisationManager().registerDestination();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "registerDestination");
    }
285580
public function register()
	{
		$this->app['authClient'] = $this->app->share(function($app)
                {
                    return new AuthClient;
                });
                
                $this->app['userClient'] = $this->app->share(function($app)
                {
                    return new UserClient;
                });

                $this->app['client'] = $this->app->share(function($app)
                {
                    return new Client;
                });
                
                $this->app['solariumClient'] = $this->app->share(function($app)
                {
                    return new SolariumClientImpl();
                });
                
                // Shortcut so developers don't need to add an Alias in app/config/app.php
                $this->app->booting(function()
                {
                    $loader = \Illuminate\Foundation\AliasLoader::getInstance();
                    $loader->alias('AuthClient', 'Ademes\Core\Facades\AuthClient');
                    $loader->alias('UserClient', 'Ademes\Core\Facades\UserClient');
                    $loader->alias('HttpClient', 'Ademes\Core\Facades\HttpClient');
                    $loader->alias('SolariumClient', 'Ademes\Core\Facades\SolariumClient');
                });
	}
849148
@Override
    public void register(Builder.Registry registry) {
        registry.add(new AzureAdTokenFactory()); 
        registry.add(MediaContract.class, MediaExceptionProcessor.class);
        registry.add(MediaRestProxy.class);
        registry.add(OAuthFilter.class);
        registry.add(ResourceLocationManager.class);
        registry.add(RedirectFilter.class);
        registry.add(VersionHeadersFilter.class);
        registry.add(UserAgentFilter.class);

        registry.alter(MediaContract.class, ClientConfig.class,
                new Builder.Alteration<ClientConfig>() {
                    @SuppressWarnings("rawtypes")
                    @Override
                    public ClientConfig alter(String profile,
                            ClientConfig instance, Builder builder,
                            Map<String, Object> properties) {

                        instance.getProperties().put(
                                JSONConfiguration.FEATURE_POJO_MAPPING, true);

                        // Turn off auto-follow redirects, because Media
                        // Services rest calls break if it's on
                        instance.getProperties().put(
                                ClientConfig.PROPERTY_FOLLOW_REDIRECTS, false);

                        try {
                            instance.getSingletons().add(
                                    new ODataEntityProvider());
                            instance.getSingletons().add(
                                    new ODataEntityCollectionProvider());
                            instance.getSingletons().add(
                                    new MediaContentProvider());
                            instance.getSingletons().add(
                                    new BatchMimeMultipartBodyWritter());
                        } catch (JAXBException e) {
                            throw new RuntimeException(e);
                        } catch (ParserConfigurationException e) {
                            throw new RuntimeException(e);
                        }

                        return instance;
                    }
                });
    }
290082
private static void registerServer(Server server, Database db) {

        if (!serverMap.containsKey(server)) {
            serverMap.put(server, new HashSet());
        }

        HashSet databases = (HashSet) serverMap.get(server);

        databases.add(db);
    }
1238157
public function boot()
    {
        $systemLocales = config('multilingual.locales');

        $this->publishes([
            __DIR__.'/config/multilingual.php' => config_path('multilingual.php'),
        ]);


        $this->app['validator']->extendImplicit('translatable_required', function ($attribute, $value, $parameters) use ($systemLocales) {
            if (! is_array($value)) {
                return false;
            }

            // Get only the locales that has a value and exists in the system locales array
            $locales = array_filter(array_keys($value), function ($locale) use ($value, $systemLocales) {
                return @$value[$locale] && in_array($locale, $systemLocales);
            });

            foreach ($systemLocales as $systemLocale) {
                if (! in_array($systemLocale, $locales)) {
                    return false;
                }
            }

            return true;
        });
    }