MCPcopy Create free account
hub / github.com/BaseXdb/basex / start

Method start

basex-core/src/main/java/org/basex/BaseXServer.java:289–296  ·  view source on GitHub ↗

Starts the database server in a separate process. @param port server port @param args command-line arguments @throws BaseXException database exception

(final int port, final String... args)

Source from the content-addressed store, hash-verified

287 * @throws BaseXException database exception
288 */
289 public static void start(final int port, final String... args) throws BaseXException {
290 // start server and check if it caused an error message
291 final String error = Util.error(Util.start(BaseXServer.class, args), 2000);
292 if(error != null) throw new BaseXException(error.trim());
293
294 // try to connect to the new server instance
295 if(!ping(S_LOCALHOST, port)) throw new BaseXException(CONNECTION_ERROR_X, port);
296 }
297
298 /**
299 * Checks if a server is running.

Callers 2

BaseXServerMethod · 0.95
runMethod · 0.45

Calls 4

errorMethod · 0.95
startMethod · 0.95
pingMethod · 0.95
trimMethod · 0.45

Tested by

no test coverage detected