asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject asterixdb git commit: ASTERIXDB-1804: update AsterixDB servlets
Date Thu, 23 Feb 2017 04:27:18 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 65da60c85 -> c09658f50


ASTERIXDB-1804: update AsterixDB servlets

Change-Id: Id48a4753775a19094b28876ef3544bda989f918d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1519
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mblow@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/c09658f5
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/c09658f5
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/c09658f5

Branch: refs/heads/master
Commit: c09658f500fc0f9f3d794cdb242eb2fb840af9b5
Parents: 65da60c
Author: Till Westmann <till@couchbase.com>
Authored: Wed Feb 22 16:44:10 2017 -0800
Committer: Till Westmann <tillw@apache.org>
Committed: Wed Feb 22 20:23:53 2017 -0800

----------------------------------------------------------------------
 .../asterix/api/http/server/ApiServlet.java     | 19 ++++--------------
 .../api/http/server/ClusterApiServlet.java      | 17 ++--------------
 .../ClusterControllerDetailsApiServlet.java     |  2 +-
 .../api/http/server/ConnectorApiServlet.java    |  6 +-----
 .../api/http/server/DiagnosticsApiServlet.java  |  2 +-
 .../asterix/api/http/server/FeedServlet.java    |  2 +-
 .../server/NodeControllerDetailsApiServlet.java |  2 +-
 .../api/http/server/QueryResultApiServlet.java  |  6 +-----
 .../api/http/server/QueryServiceServlet.java    |  6 +-----
 .../api/http/server/QueryStatusApiServlet.java  |  6 +-----
 .../http/server/QueryWebInterfaceServlet.java   | 21 +++-----------------
 .../asterix/api/http/server/RestApiServlet.java | 11 +++++++++-
 .../api/http/server/ShutdownApiServlet.java     |  6 +-----
 .../api/http/server/VersionApiServlet.java      |  6 +-----
 .../asterix/test/server/RSSFeedServlet.java     | 18 ++---------------
 15 files changed, 31 insertions(+), 99 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c09658f5/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ApiServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ApiServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ApiServlet.java
index 395365a..40c7f2c 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ApiServlet.java
@@ -83,7 +83,8 @@ public class ApiServlet extends AbstractServlet {
         this.componentProvider = componentProvider;
     }
 
-    public void doPost(IServletRequest request, IServletResponse response) {
+    @Override
+    protected void post(IServletRequest request, IServletResponse response) {
         // Query language
         ILangCompilationProvider compilationProvider = "AQL".equals(request.getParameter("query-language"))
                 ? aqlCompilationProvider : sqlppCompilationProvider;
@@ -157,7 +158,8 @@ public class ApiServlet extends AbstractServlet {
         }
     }
 
-    public void doGet(IServletRequest request, IServletResponse response) {
+    @Override
+    protected void get(IServletRequest request, IServletResponse response) {
         String resourcePath = null;
         String requestURI = request.getHttpRequest().uri();
 
@@ -226,17 +228,4 @@ public class ApiServlet extends AbstractServlet {
     private static boolean isSet(String requestParameter) {
         return requestParameter != null && "true".equals(requestParameter);
     }
-
-    @Override
-    public void handle(IServletRequest request, IServletResponse response) {
-        response.setStatus(HttpResponseStatus.OK);
-        if (request.getHttpRequest().method() == HttpMethod.GET) {
-            doGet(request, response);
-        } else if (request.getHttpRequest().method() == HttpMethod.POST) {
-            doPost(request, response);
-        } else {
-            response.setStatus(HttpResponseStatus.METHOD_NOT_ALLOWED);
-        }
-    }
-
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c09658f5/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterApiServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterApiServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterApiServlet.java
index 71559b1..1d37baf 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterApiServlet.java
@@ -65,7 +65,8 @@ public class ClusterApiServlet extends AbstractServlet {
         super(ctx, paths);
     }
 
-    protected void getUnsafe(IServletRequest request, IServletResponse response) throws IOException
{
+    @Override
+    protected void get(IServletRequest request, IServletResponse response) throws IOException
{
         HttpUtil.setContentType(response, HttpUtil.ContentType.APPLICATION_JSON, HttpUtil.Encoding.UTF8);
         PrintWriter responseWriter = response.writer();
         try {
@@ -173,18 +174,4 @@ public class ClusterApiServlet extends AbstractServlet {
         }
         return clusterURL;
     }
-
-    @Override
-    public void handle(IServletRequest request, IServletResponse response) {
-        if (request.getHttpRequest().method() != HttpMethod.GET) {
-            response.setStatus(HttpResponseStatus.METHOD_NOT_ALLOWED);
-            return;
-        }
-        try {
-            getUnsafe(request, response);
-        } catch (IOException e) {
-            LOGGER.log(Level.WARNING, "Unhandled IOException thrown from " + getClass().getName()
+ " get impl", e);
-        }
-    }
-
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c09658f5/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterControllerDetailsApiServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterControllerDetailsApiServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterControllerDetailsApiServlet.java
index 69f5db4..776f884 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterControllerDetailsApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterControllerDetailsApiServlet.java
@@ -46,7 +46,7 @@ public class ClusterControllerDetailsApiServlet extends ClusterApiServlet
{
     }
 
     @Override
-    protected void getUnsafe(IServletRequest request, IServletResponse response) throws IOException
{
+    protected void get(IServletRequest request, IServletResponse response) throws IOException
{
         PrintWriter responseWriter = response.writer();
         IHyracksClientConnection hcc = (IHyracksClientConnection) ctx.get(HYRACKS_CONNECTION_ATTR);
         try {

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c09658f5/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ConnectorApiServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ConnectorApiServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ConnectorApiServlet.java
index a6c0783..cd632ca 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ConnectorApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ConnectorApiServlet.java
@@ -65,11 +65,7 @@ public class ConnectorApiServlet extends AbstractServlet {
     }
 
     @Override
-    public void handle(IServletRequest request, IServletResponse response) {
-        if (request.getHttpRequest().method() != HttpMethod.GET) {
-            response.setStatus(HttpResponseStatus.METHOD_NOT_ALLOWED);
-            return;
-        }
+    protected void get(IServletRequest request, IServletResponse response) {
         response.setStatus(HttpResponseStatus.OK);
         try {
             HttpUtil.setContentType(response, HttpUtil.ContentType.TEXT_HTML, HttpUtil.Encoding.UTF8);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c09658f5/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/DiagnosticsApiServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/DiagnosticsApiServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/DiagnosticsApiServlet.java
index 4d6f641..366007d 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/DiagnosticsApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/DiagnosticsApiServlet.java
@@ -55,7 +55,7 @@ public class DiagnosticsApiServlet extends NodeControllerDetailsApiServlet
{
     }
 
     @Override
-    protected void getUnsafe(IServletRequest request, IServletResponse response) throws IOException
{
+    protected void get(IServletRequest request, IServletResponse response) throws IOException
{
         HttpUtil.setContentType(response, HttpUtil.ContentType.APPLICATION_JSON, HttpUtil.Encoding.UTF8);
         PrintWriter responseWriter = response.writer();
         ObjectNode json;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c09658f5/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/FeedServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/FeedServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/FeedServlet.java
index 7831674..0b4a088 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/FeedServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/FeedServlet.java
@@ -46,7 +46,7 @@ public class FeedServlet extends AbstractServlet {
     }
 
     @Override
-    public void handle(IServletRequest request, IServletResponse response) {
+    protected void get(IServletRequest request, IServletResponse response) {
         try {
             response.setStatus(HttpResponseStatus.OK);
             String resourcePath;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c09658f5/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NodeControllerDetailsApiServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NodeControllerDetailsApiServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NodeControllerDetailsApiServlet.java
index 30718cf..ca0888b 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NodeControllerDetailsApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NodeControllerDetailsApiServlet.java
@@ -54,7 +54,7 @@ public class NodeControllerDetailsApiServlet extends ClusterApiServlet {
     }
 
     @Override
-    protected void getUnsafe(IServletRequest request, IServletResponse response) throws IOException
{
+    protected void get(IServletRequest request, IServletResponse response) throws IOException
{
         PrintWriter responseWriter = response.writer();
         IHyracksClientConnection hcc = (IHyracksClientConnection) ctx.get(HYRACKS_CONNECTION_ATTR);
         try {

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c09658f5/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryResultApiServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryResultApiServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryResultApiServlet.java
index 522fd29..dfc8a8f 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryResultApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryResultApiServlet.java
@@ -59,11 +59,7 @@ public class QueryResultApiServlet extends AbstractServlet {
     }
 
     @Override
-    public void handle(IServletRequest request, IServletResponse response) {
-        if (request.getHttpRequest().method() != HttpMethod.GET) {
-            response.setStatus(HttpResponseStatus.METHOD_NOT_ALLOWED);
-            return;
-        }
+    protected void get(IServletRequest request, IServletResponse response) {
         response.setStatus(HttpResponseStatus.OK);
         // TODO this seems wrong ...
         try {

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c09658f5/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
index 3c7a1a1..c0a38e8 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
@@ -85,11 +85,7 @@ public class QueryServiceServlet extends AbstractServlet {
     }
 
     @Override
-    public void handle(IServletRequest request, IServletResponse response) {
-        if (request.getHttpRequest().method() != HttpMethod.POST) {
-            response.setStatus(HttpResponseStatus.METHOD_NOT_ALLOWED);
-            return;
-        }
+    protected void post(IServletRequest request, IServletResponse response) {
         try {
             handleRequest(getRequestParameters(request), response);
         } catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c09658f5/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryStatusApiServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryStatusApiServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryStatusApiServlet.java
index 075615e..5a62eaa 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryStatusApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryStatusApiServlet.java
@@ -53,11 +53,7 @@ public class QueryStatusApiServlet extends AbstractServlet {
     }
 
     @Override
-    public void handle(IServletRequest request, IServletResponse response) {
-        if (request.getHttpRequest().method() != HttpMethod.GET) {
-            response.setStatus(HttpResponseStatus.METHOD_NOT_ALLOWED);
-            return;
-        }
+    protected void get(IServletRequest request, IServletResponse response) {
         response.setStatus(HttpResponseStatus.OK);
         try {
             HttpUtil.setContentType(response, HttpUtil.ContentType.TEXT_HTML, HttpUtil.Encoding.UTF8);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c09658f5/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryWebInterfaceServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryWebInterfaceServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryWebInterfaceServlet.java
index 8a41fc1..b839b26 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryWebInterfaceServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryWebInterfaceServlet.java
@@ -48,23 +48,7 @@ public class QueryWebInterfaceServlet extends AbstractServlet {
     }
 
     @Override
-    public void handle(IServletRequest request, IServletResponse response) {
-        try {
-            if (request.getHttpRequest().method() == HttpMethod.GET) {
-                doGet(request, response);
-            } else if (request.getHttpRequest().method() == HttpMethod.POST) {
-                doPost(response);
-            } else {
-                response.setStatus(HttpResponseStatus.METHOD_NOT_ALLOWED);
-            }
-        } catch (IOException e) {
-            LOGGER.log(Level.WARNING, "Failure setting content type", e);
-            response.setStatus(HttpResponseStatus.INTERNAL_SERVER_ERROR);
-            return;
-        }
-    }
-
-    private void doGet(IServletRequest request, IServletResponse response) throws IOException
{
+    protected void get(IServletRequest request, IServletResponse response) throws IOException
{
         String resourcePath = null;
         String requestURI = request.getHttpRequest().uri();
         response.setStatus(HttpResponseStatus.OK);
@@ -105,7 +89,8 @@ public class QueryWebInterfaceServlet extends AbstractServlet {
         }
     }
 
-    private void doPost(IServletResponse response) throws IOException {
+    @Override
+    protected void post(IServletRequest request, IServletResponse response) throws IOException
{
         HttpUtil.setContentType(response, HttpUtil.ContentType.APPLICATION_JSON, HttpUtil.Encoding.UTF8);
         ExternalProperties externalProperties = AppContextInfo.INSTANCE.getExternalProperties();
         response.setStatus(HttpResponseStatus.OK);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c09658f5/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/RestApiServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/RestApiServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/RestApiServlet.java
index d1ae95d..bdc9d62 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/RestApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/RestApiServlet.java
@@ -157,7 +157,16 @@ public abstract class RestApiServlet extends AbstractServlet {
     }
 
     @Override
-    public void handle(IServletRequest request, IServletResponse response) {
+    protected void get(IServletRequest request, IServletResponse response) {
+        getOrPost(request, response);
+    }
+
+    @Override
+    protected void post(IServletRequest request, IServletResponse response) {
+        getOrPost(request, response);
+    }
+
+    private void getOrPost(IServletRequest request, IServletResponse response) {
         try {
             String query = query(request);
             // enable cross-origin resource sharing

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c09658f5/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ShutdownApiServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ShutdownApiServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ShutdownApiServlet.java
index d9dc424..9050907 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ShutdownApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ShutdownApiServlet.java
@@ -54,11 +54,7 @@ public class ShutdownApiServlet extends AbstractServlet {
     }
 
     @Override
-    public void handle(IServletRequest request, IServletResponse response) {
-        if (request.getHttpRequest().method() != HttpMethod.POST) {
-            response.setStatus(HttpResponseStatus.METHOD_NOT_ALLOWED);
-            return;
-        }
+    protected void post(IServletRequest request, IServletResponse response) {
         IHyracksClientConnection hcc = (IHyracksClientConnection) ctx.get(HYRACKS_CONNECTION_ATTR);
         boolean terminateNCServices = "true".equalsIgnoreCase(request.getParameter("all"));
         Thread t = new Thread(() -> {

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c09658f5/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/VersionApiServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/VersionApiServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/VersionApiServlet.java
index 62b85cd..91bebfe 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/VersionApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/VersionApiServlet.java
@@ -47,11 +47,7 @@ public class VersionApiServlet extends AbstractServlet {
     }
 
     @Override
-    public void handle(IServletRequest request, IServletResponse response) {
-        if (request.getHttpRequest().method() != HttpMethod.GET) {
-            response.setStatus(HttpResponseStatus.METHOD_NOT_ALLOWED);
-            return;
-        }
+    protected void get(IServletRequest request, IServletResponse response) {
         response.setStatus(HttpResponseStatus.OK);
         AppContextInfo props = (AppContextInfo) ctx.get(ASTERIX_BUILD_PROP_ATTR);
         Map<String, String> buildProperties = props.getBuildProperties().getAllProps();

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c09658f5/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/server/RSSFeedServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/server/RSSFeedServlet.java
b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/server/RSSFeedServlet.java
index 2cf47f9..f79f5e9 100644
--- a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/server/RSSFeedServlet.java
+++ b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/server/RSSFeedServlet.java
@@ -61,7 +61,8 @@ public class RSSFeedServlet extends AbstractServlet {
         defaultFeedType = (defaultFeedType != null) ? defaultFeedType : "atom_0.3";
     }
 
-    protected void doGet(IServletRequest req, IServletResponse res) throws IOException {
+    @Override
+    protected void get(IServletRequest req, IServletResponse res) throws IOException {
         try {
             SyndFeed feed = getFeed(req);
             String feedType = req.getParameter(FEED_TYPE);
@@ -78,21 +79,6 @@ public class RSSFeedServlet extends AbstractServlet {
         }
     }
 
-    @Override
-    public void handle(IServletRequest req, IServletResponse res) {
-        if (req.getHttpRequest().method() == HttpMethod.GET) {
-            try {
-                doGet(req, res);
-            } catch (IOException e) {
-                // Servlet methods should not throw exceptions
-                // http://cwe.mitre.org/data/definitions/600.html
-                GlobalConfig.ASTERIX_LOGGER.log(Level.SEVERE, e.getMessage(), e);
-            }
-        } else {
-            res.setStatus(HttpResponseStatus.METHOD_NOT_ALLOWED);
-        }
-    }
-
     protected SyndFeed getFeed(IServletRequest req) throws IOException, FeedException, ParseException
{
         SyndFeed feed = new SyndFeedImpl();
         feed.setTitle("Sample Feed (created with ROME)");


Mime
View raw message