Allows the creation of a Server instance with various configurations

@return a Server instance
486988
public static Server createServer(
            ServerID serverID, io.grpc.Server rpcServer,
            LockManager lockManager, AttributeDeduplicatorDaemon attributeDeduplicatorDaemon, KeyspaceManager keyspaceStore) {

        Server server = new Server(serverID, lockManager, rpcServer, attributeDeduplicatorDaemon, keyspaceStore);

        Runtime.getRuntime().addShutdownHook(new Thread(server::close, "grakn-server-shutdown"));

        return server;
    }
902035
protected function createServer()
    {
        $config = $this->getServerInitConfig();
        $this->swooleServer = new \swoole_websocket_server($config['host'], $config['port'], $config['mode'], $config['sockType']);
    }
1028156
public function getServer()
    {
        $server = new Server(
            $this->getSource(),
            $this->getCache(),
            $this->getApi()
        );

        $server->setSourcePathPrefix($this->getSourcePathPrefix());
        $server->setCachePathPrefix($this->getCachePathPrefix());
        $server->setGroupCacheInFolders($this->getGroupCacheInFolders());
        $server->setCacheWithFileExtensions($this->getCacheWithFileExtensions());
        $server->setDefaults($this->getDefaults());
        $server->setPresets($this->getPresets());
        $server->setBaseUrl($this->getBaseUrl());
        $server->setResponseFactory($this->getResponseFactory());

        return $server;
    }
244805
public static Server getServer(final Object instance, final String bindAddress, final int port,
			final int numHandlers) throws IOException {
		return new Server(instance, bindAddress, port, numHandlers);
	}
710111
public static SSLContext getInstance(boolean server) throws GeneralSecurityException {
        SSLContext retInstance = null;
        if (server) {
            if (serverInstance == null) {
                synchronized (BogusSslContextFactory.class) {
                    if (serverInstance == null) {
                        try {
                            serverInstance = createBougusServerSslContext();
                        } catch (Exception ioe) {
                            throw new GeneralSecurityException("Can't create Server SSLContext:" + ioe);
                        }
                    }
                }
            }
            retInstance = serverInstance;
        } else {
            if (clientInstance == null) {
                synchronized (BogusSslContextFactory.class) {
                    if (clientInstance == null) {
                        clientInstance = createBougusClientSslContext();
                    }
                }
            }
            retInstance = clientInstance;
        }
        return retInstance;
    }
626955
public FtpServerBuilder server(org.apache.ftpserver.FtpServer server) {
        endpoint.setFtpServer(server);
        return this;
    }
191702
public function getAJAXServerInstance()
    {
        if ($this->ajaxServer === null) {
            $this->ajaxServer = new ServerImpl($this);
        }
        return $this->ajaxServer;
    }
296910
public ServerConfiguration copy() throws IOException {
        ReadableByteArrayOutputStream out = new ReadableByteArrayOutputStream();
        serialize(out);
        return new ServerConfigurationParser(out.toInputStream()).parse();
    }
245341
public ClientConfiguration createClientConfiguration() {
        return ClientConfiguration.builder(buildTimeSeriesUrl(), username, password)
                .connectTimeoutMillis(connectTimeoutMillis)
                .readTimeoutMillis(readTimeoutMillis)
                .pingTimeoutMillis(pingTimeoutMillis)
                .ignoreSSLErrors(ignoreSSLErrors)
                .skipStreamingControl(skipStreamingControl)
                .enableBatchCompression(enableGzipCompression)
                .userAgent(userAgent)
                .build();
    }
1059117
public Server create(int maxThreads, int minThreads, int threadTimeoutMillis) {
        Server server;

        if (maxThreads > 0) {
            int max = maxThreads;
            int min = (minThreads > 0) ? minThreads : 8;
            int idleTimeout = (threadTimeoutMillis > 0) ? threadTimeoutMillis : 60000;

            server = new Server(new QueuedThreadPool(max, min, idleTimeout));
        } else {
            server = new Server();
        }

        return server;
    }
1220266
protected function createSwooleServer()
    {
        $server     = $this->isWebsocket ? WebsocketServer::class : HttpServer::class;
        $config     = $this->app->config;
        $host       = $config->get('swoole.server.host');
        $port       = $config->get('swoole.server.port');
        $socketType = $config->get('swoole.server.socket_type', SWOOLE_SOCK_TCP);
        $mode       = $config->get('swoole.server.mode', SWOOLE_PROCESS);

        static::$server = new $server($host, $port, $mode, $socketType);

        $options = $config->get('swoole.server.options');

        static::$server->set($options);
    }
67457
public static KrakenSystem createAndAddSystem(ServerBartender serverSelf)
  {
    SystemManager system = preCreate(KrakenSystem.class);

    KrakenSystem krakenSystem = new KrakenSystem(serverSelf);
    
    system.addSystem(KrakenSystem.class, krakenSystem);

    return krakenSystem;
  }
534949
protected function createServer()
    {
        $config = $this->getServerInitConfig();
        $this->swooleServer = new \swoole_http_server($config['host'], $config['port'], $config['mode'], $config['sockType']);
    }
53547
public Configuration getConfiguration() {
		if (configuration == null) {
			try {
				configuration = new PropertiesConfiguration(getClass().getResource("/nextserver.properties"));
			} catch (ConfigurationException e) {
				throw new RuntimeException(e);
			}
		}		
		return configuration;
	}
670569
public static ConfigurationManager getInstance()
		throws ConfigurationException
	{

		if (instance == null) {
			throw ErrorFactory
					.createConfigurationException(ErrorKeys.CONFIGURATION_CONFIGURATIONMANAGER_NOT_INITIALIZED);
		}
		return instance;
	}
318064
def create(self):
        
        data = values.of({})

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return ConfigurationInstance(self._version, payload, )
887487
private Server __buildServer() {
        Server mServer = new Server();

        // Connectors...
        Connector[] connectors = getConnectors(mServer);
        if (connectors == null || connectors.length == 0)
            throw new RuntimeException("Missing connectors");

        for (Connector connector : connectors) {
            mServer.addConnector(connector);
        }

        ServletContextHandler handler = new ServletContextHandler(ServletContextHandler.SESSIONS);
        handler.setContextPath("/");
        handler.setResourceBase(System.getProperty("java.io.tmpdir"));

        // Filters...
        for (Map.Entry<String, List<Class<? extends Filter>>> filterEntry : filterMap.entrySet()) {
            for (Class<? extends Filter> filterClass : filterEntry.getValue()) {
                handler.addFilter(filterClass, filterEntry.getKey(), EnumSet.of(DispatcherType.REQUEST));
            }
        }

        // Servlets...
        for (Map.Entry<String, Class<? extends HttpServlet>> servletEntry : servletMap.entrySet()) {
            handler.addServlet(servletEntry.getValue(), servletEntry.getKey());
        }

        // Event listeners...
        for (Class<? extends EventListener> eventListenerClass : servletContextListenerSet) {
            try {
                EventListener eventListener = eventListenerClass.newInstance();
                handler.addEventListener(eventListener);
            } catch (IllegalAccessException | InstantiationException ex) {
                throw new RuntimeException(ex);
            }
        }

        // Error handler...
        if (errorHandler != null)
            handler.setErrorHandler(errorHandler);

        mServer.setHandler(handler);
        return mServer;
    }