From 8de746ba0cec62e3ad2c854712633c6b004dc453 Mon Sep 17 00:00:00 2001 From: Nick Lin <33555716+nicklin96@users.noreply.github.com> Date: Thu, 24 Jan 2019 17:12:07 +0800 Subject: [PATCH] Allow user-defined port, default sparql number and answer number --- src/application/GanswerHttp.java | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/src/application/GanswerHttp.java b/src/application/GanswerHttp.java index 1d1f785..9341d72 100644 --- a/src/application/GanswerHttp.java +++ b/src/application/GanswerHttp.java @@ -8,9 +8,47 @@ import org.eclipse.jetty.server.Handler; import qa.Globals; public class GanswerHttp { + static int maxAnswerNum = 100; + static int maxSparqlNum = 3; + static int defaultPort = 9999; public static void main(String[] args) throws Exception { //step 1: initialize the server with a given port - Server server = new Server(9999); + if(args.length>0){ + for(int k=0;k