public void handleRequest()

in neptune-endpoints-info-lambda/src/main/java/software/amazon/lambda/NeptuneEndpointsInfoLambda.java [73:98]


    public void handleRequest(InputStream input, OutputStream output, Context context) throws IOException {

        LambdaLogger logger = context.getLogger();

        EndpointsType endpointsType = null;

        Scanner scanner = new Scanner(input);
        if (scanner.hasNext()) {
            String param = scanner.next().replace("\"", "");
            if (!param.isEmpty()) {
                endpointsType = EndpointsType.valueOf(param);
            }
        }

        try {
            refreshAgent.awake();
        } catch (InterruptedException | ExecutionException e) {
            throw new RuntimeException("Failed to awake refresh agent", e);
        }

        if (endpointsType != null) {
            returnEndpointListForLegacyClient(endpointsType, logger, output);
        } else {
            returnClusterMetadata(logger, output);
        }
    }