From 1c529c69bd21da73d084a3236c65b5c4397d2b8b Mon Sep 17 00:00:00 2001 From: sapessi Date: Tue, 20 Jun 2017 13:19:08 -0700 Subject: [PATCH] Minor Javadoc changes and fixes --- .../proxy/internal/LambdaContainerHandler.java | 2 +- .../serverless/proxy/internal/RequestReader.java | 1 + .../internal/model/ApiGatewayAuthorizerContext.java | 12 +++++------- .../internal/servlet/AwsHttpServletRequest.java | 2 +- .../servlet/AwsLambdaServletContainerHandler.java | 12 ++++++------ .../proxy/internal/servlet/FilterHolder.java | 6 +++--- .../proxy/jersey/JerseyAwsProxyRequestReader.java | 1 + .../proxy/jersey/JerseyLambdaContainerHandler.java | 6 +++++- 8 files changed, 23 insertions(+), 19 deletions(-) diff --git a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/LambdaContainerHandler.java b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/LambdaContainerHandler.java index f924576da..42edfaaf2 100644 --- a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/LambdaContainerHandler.java +++ b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/LambdaContainerHandler.java @@ -136,7 +136,7 @@ public ResponseType proxy(RequestType request, Context context) { /** * Returns the current container configuration object. - * @return + * @return The container configuration object */ public static ContainerConfig getContainerConfig() { return config; diff --git a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/RequestReader.java b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/RequestReader.java index 198e33e89..fcd7dacfe 100644 --- a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/RequestReader.java +++ b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/RequestReader.java @@ -65,6 +65,7 @@ public abstract class RequestReader { * @param request The incoming request object * @param securityContext A jax-rs SecurityContext object (@see com.amazonaws.serverless.proxy.internal.SecurityContextWriter) * @param lambdaContext The AWS Lambda context for the request + * @param config The container configuration object. This is passed in by the LambdaContainerHandler. * @return A valid request object for the underlying container * @throws InvalidRequestEventException This exception is thrown if anything goes wrong during the creation of the request object */ diff --git a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/ApiGatewayAuthorizerContext.java b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/ApiGatewayAuthorizerContext.java index 9cf189a76..e8d95de02 100644 --- a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/ApiGatewayAuthorizerContext.java +++ b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/ApiGatewayAuthorizerContext.java @@ -21,13 +21,11 @@ /** * Context object used for custom authorizers and Cognito User Pool authorizers. - *

- * Custom authorizers populate the principalId field. All other custom values - * returned by the authorizer are accessible via the getContextValue method. - *

- *

- * Cognito User Pool authorizers populate the

claims
object. - *

+ * + * Custom authorizers populate the principalId field. All other custom values + * returned by the authorizer are accessible via the getContextValue method. + * + * Cognito User Pool authorizers populate the claims object. */ public class ApiGatewayAuthorizerContext { diff --git a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/servlet/AwsHttpServletRequest.java b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/servlet/AwsHttpServletRequest.java index 221c64832..32f2fcf78 100644 --- a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/servlet/AwsHttpServletRequest.java +++ b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/servlet/AwsHttpServletRequest.java @@ -259,7 +259,7 @@ protected Cookie[] parseCookieHeaderValue(String headerValue) { /** * Given a map of key/values query string parameters from API Gateway, creates a query string as it would have * been in the original url. - * @param parameters A Map of query string parameters + * @param parameters A Map<String, String> of query string parameters * @return The generated query string for the URI */ protected String generateQueryString(Map parameters) { diff --git a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/servlet/AwsLambdaServletContainerHandler.java b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/servlet/AwsLambdaServletContainerHandler.java index 75db82f5f..14fb1b851 100644 --- a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/servlet/AwsLambdaServletContainerHandler.java +++ b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/servlet/AwsLambdaServletContainerHandler.java @@ -21,8 +21,6 @@ import javax.servlet.ServletContext; import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -33,10 +31,10 @@ * implementations that want to support the servlet 3.1 specs. * * Because Lambda only allows one event per container at a time, this object also acts as the RequestDispatcher - * @param - * @param - * @param - * @param + * @param The expected request object. This is the model class that the event JSON is de-serialized to + * @param The expected Lambda function response object. Responses from the container will be written to this model object + * @param The request type for the wrapped Java container + * @param The response or response writer type for the wrapped Java container */ public abstract class AwsLambdaServletContainerHandler getInitParameters() { return initParameters; @@ -153,7 +153,7 @@ public Map getInitParameters() { /** * The servlet context that initialized the filter - * @return + * @return The servlet context the filter was initialized on */ public ServletContext getServletContext() { return servletContext; diff --git a/aws-serverless-java-container-jersey/src/main/java/com/amazonaws/serverless/proxy/jersey/JerseyAwsProxyRequestReader.java b/aws-serverless-java-container-jersey/src/main/java/com/amazonaws/serverless/proxy/jersey/JerseyAwsProxyRequestReader.java index 6b70c65b2..959c77c2f 100644 --- a/aws-serverless-java-container-jersey/src/main/java/com/amazonaws/serverless/proxy/jersey/JerseyAwsProxyRequestReader.java +++ b/aws-serverless-java-container-jersey/src/main/java/com/amazonaws/serverless/proxy/jersey/JerseyAwsProxyRequestReader.java @@ -59,6 +59,7 @@ public class JerseyAwsProxyRequestReader extends RequestReader ge /** * Private constructor for a LambdaContainer. Sets the application object, sets the ApplicationHandler, * and initializes the application using the onStartup method. - * @param jaxRsApplication A Jersey application instance. + * @param requestReader A request reader instance + * @param responseWriter A response writer instance + * @param securityContextWriter A security context writer object + * @param exceptionHandler An exception handler + * @param jaxRsApplication The JaxRs application */ public JerseyLambdaContainerHandler(RequestReader requestReader, ResponseWriter responseWriter,