changed to unmaintained
[aaf/authz.git] / auth / auth-core / src / main / java / org / onap / aaf / auth / rserv / RServlet.java
index c1bfd6a..db39be4 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -32,6 +32,9 @@ import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.onap.aaf.cadi.CadiException;
+import org.onap.aaf.cadi.LocatorException;
+import org.onap.aaf.misc.env.APIException;
 import org.onap.aaf.misc.env.Env;
 import org.onap.aaf.misc.env.TimeTaken;
 import org.onap.aaf.misc.env.Trans;
@@ -56,19 +59,19 @@ public abstract class RServlet<TRANS extends Trans> implements Servlet {
         r.add(code,moreTypes);
         env.init().log(r.report(code),code);
     }
-    
+
     @Override
     public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
         HttpServletRequest request = (HttpServletRequest)req;
         HttpServletResponse response = (HttpServletResponse)res;
-        
+
         @SuppressWarnings("unchecked")
         TRANS trans = (TRANS)req.getAttribute(TransFilter.TRANS_TAG);
         if (trans==null) {
             response.setStatus(404); // Not Found, because it didn't go through TransFilter
             return;
         }
-        
+
         Route<TRANS> route;
         HttpCode<TRANS,?> code=null;
         String ct = req.getContentType();
@@ -85,12 +88,12 @@ public abstract class RServlet<TRANS extends Trans> implements Servlet {
                 response.setStatus(404); // Not Found
             } else {
                 // Find best Code in Route based on "Accepts (Get) or Content-Type" (if exists)
-                code = codesetter.code();// route.getCode(trans, request, response);
+                code = codesetter.code();
             }
         } finally {
             tt.done();
         }
-        
+
         if (route!=null && code!=null) {
             StringBuilder sb = new StringBuilder(72);
             sb.append(route.auditText);
@@ -116,12 +119,21 @@ public abstract class RServlet<TRANS extends Trans> implements Servlet {
             }
         }
     }
-    
+
     @Override
     public String getServletInfo() {
         return "RServlet for Jetty";
     }
 
+    /**
+     * Allow Service to instantiate certain actions after service starts up
+     * @throws LocatorException
+     * @throws CadiException
+     * @throws APIException
+     */
+    public void postStartup(String hostname, int port) throws APIException {
+    }
+
     @Override
     public void destroy() {
     }