@ngdoc function
@name w20CoreHypermedia.service:HomeService#register
@methodOf w20CoreHypermedia.service:HomeService
@param {Object} resource a json-home compliant resource declaration

@description

Register a new home resource
346048
function (resource) {
                    validate(resource);
                    var rel = Object.keys(resource)[0];
                    home[endpoint] = home[endpoint] ? home[endpoint] : {};
                    home[endpoint][rel] = resource[rel];
                }
715600
protected function registerClient()
    {
        $view = $this->getView();
        TreeViewAsset::register($view);

        $selector = ArrayHelper::remove($this->clientOptions, 'selector', 'ol.sortable');
        $view->registerJs("ns = $('{$selector}').nestedSortable(" . Json::htmlEncode($this->clientOptions) . ");");

        $treeView = $this->options['id'];
        $loading = $this->loadingOptions['id'];
        $view->registerJs(<<<JS
treeView = $('#{$treeView}');
loading = $('#{$loading}');
JS
        );
    }
1266762
public static void setHomeUrl(HomeUrl homeUrl) {
		HomeUrlRequest homeUrlRequest = new HomeUrlRequest();
		homeUrlRequest.setHomeUrl(homeUrl);
		FbBotMillNetworkController.postMessengerProfile(homeUrlRequest);

	}
459840
function registerForChanges(jolokia, $scope, arguments, callback, options) {
        var decorated = {
            responseJson: '',
            success: function (response) {
                var json = angular.toJson(response.value);
                if (decorated.responseJson !== json) {
                    decorated.responseJson = json;
                    callback(response);
                }
            }
        };
        angular.extend(decorated, options);
        return Core.register(jolokia, $scope, arguments, onSuccess(undefined, decorated));
    }
791942
def _register_service(self):
        
        if (
            self._registration is None
            and self.specifications
            and self.__validated
            and self.__controller_on
        ):
            # Use a copy of component properties
            properties = self._ipopo_instance.context.properties.copy()
            bundle_context = self._ipopo_instance.bundle_context

            # Register the service
            self._registration = bundle_context.register_service(
                self.specifications,
                self._ipopo_instance.instance,
                properties,
                factory=self.__is_factory,
                prototype=self.__is_prototype,
            )
            self._svc_reference = self._registration.get_reference()

            # Notify the component
            self._ipopo_instance.safe_callback(
                ipopo_constants.IPOPO_CALLBACK_POST_REGISTRATION,
                self._svc_reference,
            )
510604
static <T> T registerJSONObject(T key, Object json) {
        registeredAtleastOnce = true;
        rawJsonMap.get().put(key, json);
        return key;
    }
347496
@Override
    protected ServiceRegistration<D> addService(S service, ServiceProperties props) {
        D decorator = createDecorator(service, props);
        if (decorator == null) {
            return null;
        }
        Dictionary<String, ?> decoratorServiceProps = decoratorServiceProps(props);
        getLogger().info("Registering decorator service {} with properties {}", decoratorType.getSimpleName(), decoratorServiceProps);
        return getBundleContext().registerService(decoratorType, decorator, decoratorServiceProps);
    }
791151
def register(self):
        
        register_url = self.base_url + "api/0.1.0/register"
        register_headers = {
            "apikey": str(self.owner_api_key),
            "resourceID": str(self.entity_id),
            "serviceType": "publish,subscribe,historicData"
        }
        with self.no_ssl_verification():
            r = requests.get(register_url, {}, headers=register_headers)
        response = r.content.decode("utf-8")
        if "APIKey" in str(r.content.decode("utf-8")):
            response = json.loads(response[:-331] + "}")  # Temporary fix to a middleware bug, should be removed in future
            response["Registration"] = "success"
        else:
            response = json.loads(response)
            response["Registration"] = "failure"
        return response
868958
public function register($route, $callback, $httpMethod = '')
    {
        // Convert empty routes to the string 'method:home'
        if (!$route) 
            $route = 'home';
        
        // append the http method supplied
        if ($httpMethod) 
            $route = strtolower($httpMethod).':'.$route;
                
        $this->routes[$route] = $callback;
    }
1171066
public <C extends Closeable> C register(C resource) {
    // Initial open check to avoid incrementing registering if we already know it's closed.
    // This is to prevent any possibility of a weird pathalogical situation where the do/while
    // loop in close() keeps looping as register() is called repeatedly from multiple threads.
    checkOpen();

    registering.incrementAndGet();
    try {
      // Need to check again after marking registration in progress to avoid a potential race.
      // (close() could have run completely between the first checkOpen() and
      // registering.incrementAndGet().)
      checkOpen();
      resources.add(resource);
      return resource;
    } finally {
      registering.decrementAndGet();
    }
  }
400063
function register(server, options, next) {
	Schema.validate(options, function (error, config) {
		if (error) {
			next(error);
		} else {
			// register a new type handler: asyncHandler
			server.handler(config.handlerName, function (route, asyncHandler) {
				return function (request, reply) {
					// call the handler, the handler should be async function return Promise object
					asyncHandler(request, reply).catch(err => {
						// use the defaultErrorhandler is defined
						if (_.isFunction(config.defaultErrorHandler)) {
							config.defaultErrorHandler(err, request, reply);
						} else {
							reply(err);
						}
					});
				};
			});

			const dirs = config.routes;
			_.each(dirs, dir => {
				const relativePath = path.relative(__dirname, process.cwd() + '/' + dir);
				importDirectory(module, relativePath, {
					visit: function visit(obj) {
						if (!_.isUndefined(obj)) {
							let routes = _.isArray(obj) ? obj : [obj];
							_.each(routes, route => {
								server.route(route);
							});
						}
					}
				});
			});
			next();
		}
	});
}
872658
@SuppressWarnings("rawtypes")
    protected <S> ServiceRegistration registerService(Class<S> clazz, S service,
            Map<String, ?> props) {
        if (service instanceof IBundleAwareService) {
            ((IBundleAwareService) service).setBundle(bundle);
        }

        Dictionary<String, Object> _p = new Hashtable<String, Object>();
        if (props != null) {
            for (Entry<String, ?> entry : props.entrySet()) {
                _p.put(entry.getKey(), entry.getValue());
            }
        }
        ServiceRegistration sr = bundleContext.registerService(clazz, service, _p);
        registeredServices.add(sr);
        return sr;
    }
366482
public static synchronized void register(Class<?> clazz, boolean indexable)
	{
		if (!resources.containsKey(clazz))
		{
			resources.put(clazz, new RestResource(clazz));

			// Optionally register this service as Indexable
			if (indexable)
			{
				IndexableServiceRegistry.register(clazz);
			}

			revision++;
		}
	}
891401
function registerHandler(routeItem, headler) {
    let method = routeItem.method.toLowerCase();
    debug(
        'Binding "%s" to path "%s" with method "%s"',
        routeItem.handler, routeItem.path, method.toUpperCase()
    );
    headler.actionHandler = true;
    components.app[method](routeItem.path, headler);
}
573278
public static <T> void register(final Class<T> service) {
        for (T each : ServiceLoader.load(service)) {
            registerServiceClass(service, each);
        }
    }
1064803
def register(self, service):
        
        if service.name not in self.services.keys():
            logger.debug('StackInABox({0}): Registering Service {1}'
                         .format(self.__id, service.name))
            regex = '^/{0}/'.format(service.name)
            self.services[service.name] = [
                re.compile(regex),
                service
            ]
            service.base_url = StackInABox.__get_service_url(self.base_url,
                                                             service.name)
            logger.debug('StackInABox({0}): Service {1} has url {2}'
                         .format(self.__id, service.name, service.base_url))
        else:
            raise ServiceAlreadyRegisteredError(
                'Service {0} is already registered'.format(service.name))
1251114
public void put(String ID,
                    String resourceName,
                    int dir,
                    boolean visible) {
        registerEntry(ID, new ResourceEntry(resourceName, dir), visible);
    }