You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2018/08/20 07:39:05 UTC
[06/19] jena git commit: Expose the command line argument processing
to build a FusekiServer.
Expose the command line argument processing to build a FusekiServer.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/d061885f
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/d061885f
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/d061885f
Branch: refs/heads/master
Commit: d061885fae1ca4ba86e0603e7b7a45d21c739802
Parents: 8d0c131
Author: Andy Seaborne <an...@apache.org>
Authored: Tue Aug 14 13:12:23 2018 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Wed Aug 15 21:34:46 2018 +0100
----------------------------------------------------------------------
.../apache/jena/fuseki/cmds/FusekiBasicCmd.java | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/d061885f/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/FusekiBasicCmd.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/FusekiBasicCmd.java b/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/FusekiBasicCmd.java
index 010b391..60ccf69 100644
--- a/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/FusekiBasicCmd.java
+++ b/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/FusekiBasicCmd.java
@@ -78,10 +78,16 @@ public class FusekiBasicCmd {
FusekiLogging.setLogging();
}
+ /** Build and run, a server based on command line syntax. This operation does not return. */
static public void main(String... argv) {
FusekiCmdInner.innerMain(argv);
}
+ /** Build, but do not start, a server based on command line syntax. */
+ static public FusekiServer build(String... argv) {
+ return FusekiCmdInner.build(argv);
+ }
+
/** Dataset setup (command line, config file) for a dataset (or several if config file) */
static class ServerConfig {
public int port;
@@ -131,11 +137,18 @@ public class FusekiBasicCmd {
// private static ModLocation modLocation = new ModLocation();
private static ModDatasetAssembler modDataset = new ModDatasetAssembler();
- static public void innerMain(String... argv) {
+ static void innerMain(String... argv) {
JenaSystem.init();
new FusekiCmdInner(argv).mainRun();
}
+ /** Build, but do not start, a server based on command line syntax. */
+ static FusekiServer build(String... argv) {
+ FusekiCmdInner inner = new FusekiCmdInner(argv);
+ inner.process();
+ return inner.buildServer();
+ }
+
private final ServerConfig serverConfig = new ServerConfig();
private boolean useTDB2;
@@ -427,6 +440,10 @@ public class FusekiBasicCmd {
}
}
+ private FusekiServer buildServer() {
+ return buildServer(serverConfig);
+ }
+
// ServerConfig -> Setup the builder.
private static FusekiServer buildServer(ServerConfig serverConfig) {
FusekiServer.Builder builder = FusekiServer.create();