Register the endpoint for given service.

@param input
RegisterEndpointRequestType encapsulate name of service and
endpointURL. Must not be <code>null</code>
423198
@Override
    public void registerEndpoint(QName serviceName, String endpointURL,
            org.talend.schemas.esb.locator._2011._11.BindingType binding,
            org.talend.schemas.esb.locator._2011._11.TransportType transport,
            SLPropertiesType properties) throws ServiceLocatorFault,
            InterruptedExceptionFault {
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Registering endpoint " + endpointURL + " for service "
                    + serviceName + "...");
        }
        try {
            initLocator();
            BindingType bindingType = binding == null ? BindingType.SOAP11
                    : BindingType.valueOf(binding.value());
            TransportType transportType = transport == null ? TransportType.HTTP
                    : TransportType.valueOf(transport.value());
            SLPropertiesImpl slProps = null;
            if (properties != null) {
                slProps = new SLPropertiesImpl();
                List<EntryType> entries = properties.getEntry();
                for (EntryType entry : entries) {
                    slProps.addProperty(entry.getKey(), entry.getValue());
                }
            }
            SimpleEndpoint eprProvider = new SimpleEndpoint(serviceName,
                    endpointURL, bindingType, transportType, slProps);

            locatorClient.register(eprProvider, true);
        } catch (ServiceLocatorException e) {
            ServiceLocatorFaultDetail serviceFaultDetail = new ServiceLocatorFaultDetail();
            serviceFaultDetail.setLocatorFaultDetail(serviceName.toString()
                    + "throws ServiceLocatorFault");
            throw new ServiceLocatorFault(e.getMessage(), serviceFaultDetail);
        } catch (InterruptedException e) {
            InterruptionFaultDetail interruptionFaultDetail = new InterruptionFaultDetail();
            interruptionFaultDetail.setInterruptionDetail(serviceName
                    .toString() + "throws InterruptionFault");
            throw new InterruptedExceptionFault(e.getMessage(),
                    interruptionFaultDetail);
        }
    }
217312
@Nonnull
  public FineUploader5Request setEndpoint (@Nonnull final ISimpleURL aRequestEndpoint)
  {
    ValueEnforcer.notNull (aRequestEndpoint, "RequestEndpoint");
    m_aRequestEndpoint = aRequestEndpoint;
    return this;
  }
1319693
private function createFormInputObject(Endpoint $endpoint, FormInterface $form, string $name): InputObjectDefinition
    {
        $inputObject = new InputObjectDefinition();
        if ($settledName = $form->getConfig()->getOption('graphql_type')) {
            $settledName = preg_replace('/Input$/', null, $settledName);
            if (\is_string($settledName) && $settledName) {
                $name = $settledName;
            }
        }
        $inputObject->setName("{$name}Input");
        $inputObject->setDescription($form->getConfig()->getOption('graphql_description'));

        foreach ($form->all() as $formField) {
            $field = new FieldDefinition();
            $label = $formField->getConfig()->getOption('label');
            $field->setName(!empty($label) ? $label : $formField->getName());
            $field->setDescription($formField->getConfig()->getOption('graphql_description') ?? null);
            $field->setDeprecationReason($formField->getConfig()->getOption('graphql_deprecation_reason') ?? null);
            $field->setNonNull($formField->isRequired());
            $field->setOriginName($formField->getName());

            if ($formField->all()) {
                $childName = $name.ucfirst($formField->getName());
                $child = $this->createFormInputObject($endpoint, $formField, $childName);
                $endpoint->addType($child);
                $field->setType($child->getName());
            } elseif (is_a($formField->getConfig()->getType()->getInnerType(), CollectionType::class)) {
                $childName = $name.ucfirst($formField->getName());
                $childFormType = $formField->getConfig()->getOptions()['entry_type'];
                $childFormOptions = $formField->getConfig()->getOptions()['entry_options'] ?? [];
                $childFormOptions['endpoint'] = $endpoint->getName();
                $childForm = $this->formFactory->create($childFormType, null, $childFormOptions);
                $childForm->setParent($form);
                try {
                    //resolve type if is a valid scalar type or predefined type
                    $this->resolveFormFieldDefinition($field, $childForm);
                    $field->setList(true);
                } catch (\InvalidArgumentException $exception) {
                    //on exception, try build a child form for this collection
                    $child = $this->createFormInputObject($endpoint, $childForm, $childName);
                    $field->setType($child->getName());
                    $field->setList(true);
                    $endpoint->add($child);
                }
            } else {
                $this->resolveFormFieldDefinition($field, $formField);
            }

            $inputObject->addField($field);
        }

        return $inputObject;
    }
498174
@Override
    public void registerService(ServiceInstance<T> service) throws Exception
    {
        Entry<T> newEntry = new Entry<T>(service);
        Entry<T> oldEntry = services.putIfAbsent(service.getId(), newEntry);
        Entry<T> useEntry = (oldEntry != null) ? oldEntry : newEntry;
        synchronized(useEntry)
        {
            if ( useEntry == newEntry ) // i.e. is new
            {
                useEntry.cache = makeNodeCache(service);
            }
            internalRegisterService(service);
        }
    }
1308635
@Override
   public void onEndpointInstantiated(final Endpoint endpoint, final Invocation invocation)
   {
      final Object _targetBean = this.getTargetBean(invocation);
      // TODO: refactor injection to AS IL
      final Reference reference = endpoint.getInstanceProvider().getInstance(_targetBean.getClass().getName());
      final Object targetBean = reference.getValue();

      InjectionHelper.injectWebServiceContext(targetBean, ThreadLocalAwareWebServiceContext.getInstance());

      if (!reference.isInitialized())
      {
         InjectionHelper.callPostConstructMethod(targetBean);
         reference.setInitialized();
      }

      endpoint.addAttachment(PreDestroyHolder.class, new PreDestroyHolder(targetBean));
   }
262376
public void endpointActivation(MessageEndpointFactory endpointFactory,
      ActivationSpec spec) throws ResourceException {
    VertxActivation activation = new VertxActivation(this, endpointFactory,
        (VertxActivationSpec) spec);
    activations.put((VertxActivationSpec) spec, activation);
    activation.start();

    log.finest("endpointActivation()");

  }
925689
public void unregisterEndpoint(String arg0, String arg1) {
        String endpointURL = null;
        QName serviceName = null;
        try {
            serviceName = QName.valueOf(URLDecoder.decode(arg0, "UTF-8"));
            endpointURL = URLDecoder.decode(arg1, "UTF-8");
        } catch (UnsupportedEncodingException e1) {
            throw new WebApplicationException(Response
                    .status(Status.INTERNAL_SERVER_ERROR)
                    .entity(e1.getMessage()).build());
        }
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Unregistering endpoint " + endpointURL + " for service "
                    + serviceName + "...");
        }
        try {
            initLocator();
            locatorClient.unregister(serviceName, endpointURL);
        } catch (ServiceLocatorException e) {
            throw new WebApplicationException(Response
                    .status(Status.INTERNAL_SERVER_ERROR)
                    .entity(e.getMessage()).build());
        } catch (InterruptedException e) {
            throw new WebApplicationException(Response
                    .status(Status.INTERNAL_SERVER_ERROR)
                    .entity(e.getMessage()).build());
        }
    }
550296
public void registerService(ProvidedServiceInstance serviceInstance) {
        getServiceDirectoryClient().registerServiceInstance(serviceInstance);
        getCacheServiceInstances().put(new ServiceInstanceToken(serviceInstance.getServiceName(), serviceInstance.getProviderId()), new InstanceHealthPair(null));
    }
284942
@Override
    public void addResource(String namespace, String service, Object resource) {
        ServiceEndPoint endPoint = toEndPoint(namespace, service, resource);
        _environment.lifecycle().manage(new ManagedRegistration(_serviceRegistry, endPoint));
        _environment.jersey().register(resource);
    }
372666
public void registerRequest(InRequestClient request)
  {
    _requestMap.put(request.getStreamId(), request);
    
    if (_requestMap.size() > 100) {
      System.out.println("RMM: " + request);
    }
  }
48738
protected void registerWebSocketEndpoint(Binding<?> binding) {//}, ServerEndpoint serverEndpoint) {

    Object instance = binding.getProvider().get();
    Class<?> instanceClass = instance.getClass();
    ServerEndpoint serverEndpoint = instanceClass.getAnnotation(ServerEndpoint.class);
    if (serverEndpoint != null) {
      try {
        // register with the servlet container such that the Guice created singleton instance
        // is the instance that is used (and not an instance created per request etc)
        log.debug("registering ServerEndpoint [{}] with servlet container", instanceClass);
        BasicWebSocketConfigurator configurator = new BasicWebSocketConfigurator(instance);
        serverContainer.addEndpoint(new BasicWebSocketEndpointConfig(instanceClass, serverEndpoint, configurator));

      } catch (Exception e) {
        log.error("Error registering WebSocket Singleton " + instance + " with the servlet container", e);
      }
    }
  }
112635
public void registerAsType(Object locator, Class<?> type) {
		if (locator == null)
			throw new NullPointerException("Locator cannot be null");
		if (type == null)
			throw new NullPointerException("Type cannot be null");

		IComponentFactory factory = new DefaultComponentFactory(type);
		_registrations.add(new Registration(locator, factory));
	}
1138129
void endpointDeactivation(ActivationSpec activationSpec, WSMessageEndpointFactory messageEndpointFactory) {
        ClassLoader previousClassLoader = jcasu.beginContextClassLoader(raClassLoader);
        try {
            BootstrapContextImpl bootstrapContext = bootstrapContextRef.getServiceWithException();
            bootstrapContext.resourceAdapter.endpointDeactivation(messageEndpointFactory, activationSpec);
        } finally {
            jcasu.endContextClassLoader(raClassLoader, previousClassLoader);
        }
        Tr.info(tc, "J2CA8804.act.spec.inactive", id, messageEndpointFactory.getJ2EEName());
    }
949151
@Reference(name = REFERENCE_ENDPOINT_ACTIVATION_SERVICES,
               service = EndpointActivationService.class,
               policy = ReferencePolicy.DYNAMIC,
               cardinality = ReferenceCardinality.MULTIPLE)
    protected synchronized void addEndPointActivationService(ServiceReference<EndpointActivationService> reference) {
        String activationSvcId = (String) reference.getProperty(ACT_SPEC_CFG_ID);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "activationSvcId : " + activationSvcId);
        }

        EndpointActivationServiceInfo easInfo = createEndpointActivationServiceInfo(activationSvcId);

        // Deactivate any endpoints that were using the old service.
        if (easInfo.service != null) {
            deactivateEndpoints(easInfo.endpointFactories);
        }

        // Activate any endpoints with the new service.
        easInfo.setReference(reference);
        activateDeferredEndpoints(easInfo.endpointFactories);
    }
523624
@Transactional
	public void register(Subscription subscription) {
		Endpoint versionsEndpoint = subscription.getEndpoint(ModuleIdentifier.VERSIONS);
		if (versionsEndpoint == null) {
			return;
		}

		LOG.info("Registering, get versions from endpoint " + versionsEndpoint.getUrl());
		Version version = findHighestMutualVersion(
				getVersions(versionsEndpoint.getUrl(), subscription.getPartnerAuthorizationToken()));

		LOG.info("Registering, get versiondetails at " + version.url);
		VersionDetails versionDetails = getVersionDetails(version.url, subscription.getPartnerAuthorizationToken());
		// store version and endpoints for this subscription
		subscription.setOcpiVersion(version.version);

		for (io.motown.ocpi.dto.Endpoint endpoint : versionDetails.endpoints) {

			subscription.addToEndpoints(new Endpoint(endpoint.identifier, endpoint.url.toString()));
			// because the endpoints in 'versionInformationResponse' are not
			// DTO's (yet) we must instantiate ModuleIdentifier from value
		}

		// if not present generate a new token
		if (subscription.getAuthorizationToken() == null) {
			subscription.generateNewAuthorizationToken();
		}
		ocpiRepository.insertOrUpdate(subscription);

		Credentials credentials = postCredentials(subscription);
		if (credentials.token != null) { // if no token update do not overwrite
			// existing partner token!
			LOG.debug("Updating partnerToken with: " + credentials.token);
			subscription.setPartnerAuthorizationToken(credentials.token);
			// at this point we can safely remove the versionsEndpoint
			LOG.info("REMOVING VERIONS-ENDPOINT");
			subscription.getEndpoints().remove(versionsEndpoint);

			ocpiRepository.insertOrUpdate(subscription);
		}
	}
668568
public void setEndpoint(String endpoint) {
        this.endpoint = endpoint;

        if (bugsnag != null) {
            bugsnag.setEndpoints(endpoint, null);
        }
    }
627588
public function addEndpoint(Endpoint $newEndpoint)
    {
        if ($this->hasEndpoint((string) $newEndpoint->getUri())) {
            throw new InputException('Endpoint already added');
        }

        // all newly added Endpoints are set to DISABLED, apart from the first one
        $status = $this->getEndpoints()->isEmpty() ? Endpoint::STATUS_ACTIVE : Endpoint::STATUS_DISABLED;
        $newEndpoint->setStatus($status);

        $this->getEndpoints()->add($newEndpoint);
    }