/*
protected ServerBuilder createDelegate()
{
return ServerBuilder.create(this);
}
340012
private String getServerIdVar()
  {
    String serverId = config().get("server.id");

    if (serverId == null) {
      int port = portServer();

      if (port > 0) { // && ! _serverConfig.isEphemeral()) {) {
        serverId = "embed-" + port;
      }
      else {
        serverId = "embed";
      }
    }

    return serverId;
  }
818483
@Override
  public <T extends BaseProxy> T create(final Class<T> clazz) {
    this.checkLocked();

    final SimpleProxyId<T> id = this.state.requestFactory.allocateId(clazz);
    final AutoBean<T> created = this.createProxy(clazz, id, false);
    return this.takeOwnership(created);
  }
1229994
@Override
    protected T createInstance() throws Exception {
        for (final String beanName : this.delegateBeanNames) {
            try {
                final T bean;
                if (this.type == null) {
                    bean = (T) this.getBeanFactory().getBean(beanName);
                } else {
                    bean = this.getBeanFactory().getBean(beanName, this.type);
                }

                if (this.logger.isInfoEnabled()) {
                    this.logger.info("Loaded bean for name " + beanName);
                }

                return bean;
            } catch (final Exception e) {
                final String msg =
                        "Failed to load bean '"
                                + beanName
                                + "' from ApplicationContext"
                                + (this.type != null ? " expecting type: " + this.type : "")
                                + ". Will try to load the next bean in the list instead. Error message from the attempt to load this bean ('"
                                + beanName
                                + "'): ";

                if (this.logger.isDebugEnabled()) {
                    this.logger.debug(msg, e);
                } else if (this.logger.isInfoEnabled()) {
                    this.logger.info(
                            msg + " " + e.getMessage() + " (enable debug for stack trace)");
                }
            }
        }

        throw new BeanCreationException(
                "None of the configured bean names could be loaded. BeanNames: "
                        + this.delegateBeanNames);
    }
726705
public function create()
  {
    $class = ClassGen::classGen(
      $this->name,
      $this->namespace,
      [
        'Phrest\API\Enums\RequestMethodEnum',
        'Phrest\SDK\Request\AbstractRequest',
        'Phrest\SDK\Request\RequestOptions',
        'Phrest\SDK\PhrestSDK'
      ],
      'AbstractRequest'
    );

    // Path
    $path = '/' . $this->version . '/'
      . strtolower($this->entityName)
      . $this->getPlaceholderUriFromUrl($this->action->url);

    $property = ClassGen::property('path', 'private', $path, 'string');
    $class->addPropertyFromGenerator($property);

    // Properties and constructor parameters
    /** @var ParameterGenerator[] $parameters */
    $parameters = [];

    // Get properties
    $getParams = $this->generateGetParamsFromUrl($this->action->url);
    if (!empty($getParams))
    {
      foreach ($getParams as $getParam)
      {
        $class->addPropertyFromGenerator(
          ClassGen::property($getParam, 'public', null)
        );

        $parameter = new ParameterGenerator($getParam);
        $parameter->setDefaultValue(null);

        $parameters[$getParam] = $parameter;
      }
    }

    // Post properties
    if (!empty($this->action->postParams))
    {
      foreach ($this->action->postParams as $name => $type)
      {
        if ($class->hasProperty($name))
        {
          continue;
        }

        $class->addPropertyFromGenerator(
          ClassGen::property($name, 'public', null, $type)
        );

        $parameter = new ParameterGenerator($name, $type);
        $parameter->setDefaultValue(null);

        $parameters[$name] = $parameter;
      }
    }

    // Constructor
    if (!empty($parameters))
    {
      $constructor = ClassGen::constructor($parameters);
      $class->addMethodFromGenerator($constructor);
    }

    // Create method
    $create = ClassGen::method('create', [], 'public', $this->getCreateBody());
    $class->addMethodFromGenerator($create);

    // Setters
    foreach ($parameters as $parameter)
    {
      $class->addMethodFromGenerator(
        ClassGen::setter($parameter->getName(), $parameter->getType())
      );
    }

    return $class;
  }
180869
protected Server createServer(IJettyConfiguration iJettyConfiguration) {
        LOG.trace("Create Jetty Server...");

        Server server = new Server(new QueuedThreadPool(iJettyConfiguration.getMaxThreads()));
        server.setStopAtShutdown(false); // Reimplemented. See
                                         // @IJettyConfiguration.stopAtShutdown
        server.setStopTimeout(iJettyConfiguration.getStopTimeout());

        return server;
    }
1198968
@Override
    public Promise<JerseyServer> createServer(@Nullable JerseyServerOptions options, @Nullable JerseyOptions jerseyOptions) {
        final Deferred<JerseyServer> d = when.defer();

        try {
            JerseyServer jerseyServer = jerseyServerProvider.get();
            jerseyServer.start(options, jerseyOptions, result -> {
                if (result.succeeded()) {
                    d.resolve(jerseyServer);
                } else {
                    d.reject(result.cause());
                }
            });

        } catch (RuntimeException e) {
            d.reject(e);
        }

        return d.getPromise();
    }
1277108
public function build(): QuerySelectorAllRequest
	{
		$instance = new QuerySelectorAllRequest();
		if ($this->nodeId === null) {
			throw new BuilderException('Property [nodeId] is required.');
		}
		$instance->nodeId = $this->nodeId;
		if ($this->selector === null) {
			throw new BuilderException('Property [selector] is required.');
		}
		$instance->selector = $this->selector;
		return $instance;
	}
556552
protected DefaultServerDolphin createServerDolphin() {
        ServerModelStore modelStore = createServerModelStore();
        ServerConnector connector = createServerConnector(modelStore, createCodec());
        return new DefaultServerDolphin(modelStore, connector);
    }
1167572
public function createServerRequest(): ServerRequestInterface
    {
        $server_request_creator = new ServerRequestCreator(
            app(ServerRequestFactoryInterface::class),
            app(UriFactoryInterface::class),
            app(UploadedFileFactoryInterface::class),
            app(StreamFactoryInterface::class)
        );

        // Until all the code is rewritten to use PSR-7 requests, we still need our hybrid request.
        if (class_exists(Request::class)) {
            return Request::createFromGlobals();
        }

        return $server_request_creator->fromGlobals();
    }
372855
public static PollTcpManagerNio create()
  {
    synchronized (_nioSelectManager) {
      if (_nioSelectManager.get() == null) {
        PollTcpManagerNio selectManager = new PollTcpManagerNio();
          
        if (selectManager.start()) {
          _nioSelectManager.set(selectManager);
        }
      }

      return _nioSelectManager.get();
    }
  }
465704
def create_jdbc_resource(name, server=None, **kwargs):
    '''
    
    '''
    defaults = {
        'description': '',
        'enabled': True,
        'id': name,
        'poolName': '',
        'target': 'server'
    }

    # Data = defaults + merge kwargs + poolname
    data = defaults
    data.update(kwargs)

    if not data['poolName']:
        raise CommandExecutionError('No pool name!')

    return _create_element(name, 'resources/jdbc-resource', data, server)
828567
protected XContentBuilder newBuilder() throws IndexException {
    try {
      XContentBuilder builder = XContentFactory.jsonBuilder();

      if (debug()) {
        builder = builder.prettyPrint();
      }

      return builder;
    } catch (final Throwable t) {
      throw new IndexException(t);
    }
  }
839670
public ServerInfoResources serverInfoResources() {
        if (serverInfo.get() == null) {
            serverInfo.compareAndSet(null, new ServerInfoResourcesImpl(this));
        }
        return serverInfo.get();
    }
594737
public Request<ResourceServer> create(ResourceServer resourceServer) {
        Asserts.assertNotNull(resourceServer, "Resource server");

        HttpUrl.Builder builder = baseUrl
                .newBuilder()
                .addPathSegments("api/v2/resource-servers");

        String url = builder.build().toString();
        CustomRequest<ResourceServer> request = new CustomRequest<>(client, url, "POST",
                new TypeReference<ResourceServer>() {
                });
        request.addHeader("Authorization", "Bearer " + apiToken);
        request.setBody(resourceServer);
        return request;
    }
626955
public FtpServerBuilder server(org.apache.ftpserver.FtpServer server) {
        endpoint.setFtpServer(server);
        return this;
    }
1299295
public function build(): QuerySelectorRequest
	{
		$instance = new QuerySelectorRequest();
		if ($this->nodeId === null) {
			throw new BuilderException('Property [nodeId] is required.');
		}
		$instance->nodeId = $this->nodeId;
		if ($this->selector === null) {
			throw new BuilderException('Property [selector] is required.');
		}
		$instance->selector = $this->selector;
		return $instance;
	}
556293
public Builder copyBuilder() {
        return GetJobArgs.builder().noHang(noHang).timeout(timeout).withCounters(withCounters);
    }