aboutsummaryrefslogtreecommitdiffstats
path: root/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/HttpServletServer.java
diff options
context:
space:
mode:
Diffstat (limited to 'policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/HttpServletServer.java')
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/HttpServletServer.java50
1 files changed, 36 insertions, 14 deletions
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/HttpServletServer.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/HttpServletServer.java
index 0adf782c..a20c125d 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/HttpServletServer.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/HttpServletServer.java
@@ -3,6 +3,8 @@
* ONAP
* ================================================================================
* Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020, 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -50,18 +52,6 @@ public interface HttpServletServer extends Startable {
void setBasicAuthentication(String user, String password, String relativeUriPath);
/**
- * Enables AAF based authentication.
- *
- * @param filterPath filter path
- */
- void setAafAuthentication(String filterPath);
-
- /**
- * Checks if AAF authentication has been enabled.
- */
- boolean isAaf();
-
- /**
* Sets the serialization provider to be used when classes are added to the service.
*
* @param provider the provider to use for message serialization and de-serialization
@@ -83,22 +73,44 @@ public interface HttpServletServer extends Startable {
* @param restClass JAX-RS API Class
*
* @throws IllegalArgumentException unable to process because of invalid input
- * @throws IllegalStateException unable to process because of invalid state
+ * @throws IllegalStateException unable to process because of invalid state, for example
+ * different types of servlets map to the same servletPath
*/
void addServletClass(String servletPath, String restClass);
/**
+ * Adds a Java Servlet.
+ *
+ * @param servletPath servlet path
+ * @param plainServletClass servlet class
+ */
+ void addStdServletClass(String servletPath, String plainServletClass);
+
+ /**
* Adds a package containing JAX-RS classes to serve REST requests.
*
* @param servletPath servlet path
* @param restPackage JAX-RS package to scan
*
* @throws IllegalArgumentException unable to process because of invalid input
- * @throws IllegalStateException unable to process because of invalid state
+ * @throws IllegalStateException unable to process because of invalid state, for example
+ * different types of servlets map to the same servletPath
*/
void addServletPackage(String servletPath, String restPackage);
/**
+ * Add a static resource path to manage static resources.
+ *
+ * @param servletPath servlet path
+ * @param resourceBase static resources folder
+ *
+ * @throws IllegalArgumentException unable to process because of invalid input
+ * @throws IllegalStateException unable to process because of invalid state, for example
+ * different types of servlets map to the same servletPath
+ */
+ void addServletResource(String servletPath, String resourceBase);
+
+ /**
* Blocking start of the http server.
*
* @param maxWaitTime max time to wait for the start to take place
@@ -108,4 +120,14 @@ public interface HttpServletServer extends Startable {
* @throws InterruptedException if the blocking operation is interrupted
*/
boolean waitedStart(long maxWaitTime) throws InterruptedException;
+
+ /**
+ * Are prometheus metrics enabled?.
+ */
+ public boolean isPrometheus();
+
+ /**
+ * Enable prometheus metrics.
+ */
+ public void setPrometheus(String metricsPath);
}