Package io.quarkus.amazon.lambda.runtime
Class AbstractLambdaPollLoop
java.lang.Object
io.quarkus.amazon.lambda.runtime.AbstractLambdaPollLoop
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractLambdaPollLoop(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.fasterxml.jackson.databind.ObjectReader cognitoIdReader, com.fasterxml.jackson.databind.ObjectReader clientCtxReader, io.quarkus.runtime.LaunchMode launchMode) -
Method Summary
Modifier and TypeMethodDescription(package private) booleanprotected AmazonLambdaContextcreateContext(HttpURLConnection requestConnection) protected abstract LambdaInputReaderprotected abstract LambdaOutputWriterprotected abstract booleanisStream()protected voidprotected voidpostResponse(URL url, Object response) protected abstract voidprocessRequest(InputStream input, OutputStream output, AmazonLambdaContext context) protected abstract ObjectprocessRequest(Object input, AmazonLambdaContext context) Invoke actual app code with unmarshalled input.protected voidprotected HttpURLConnectionresponseStream(URL url) protected booleanvoidstartPollLoop(io.quarkus.runtime.ShutdownContext context)
-
Field Details
-
requestConnection
-
-
Constructor Details
-
AbstractLambdaPollLoop
public AbstractLambdaPollLoop(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.fasterxml.jackson.databind.ObjectReader cognitoIdReader, com.fasterxml.jackson.databind.ObjectReader clientCtxReader, io.quarkus.runtime.LaunchMode launchMode)
-
-
Method Details
-
shouldLog
-
isStream
protected abstract boolean isStream() -
startPollLoop
public void startPollLoop(io.quarkus.runtime.ShutdownContext context) -
processRequest
protected abstract Object processRequest(Object input, AmazonLambdaContext context) throws Exception Invoke actual app code with unmarshalled input.- Parameters:
input- unmarshalled input (probably from json)context-- Returns:
- Unmarshalled Java output (will probably be marshalled to json)
- Throws:
Exception
-
processRequest
protected abstract void processRequest(InputStream input, OutputStream output, AmazonLambdaContext context) throws Exception - Throws:
Exception
-
getInputReader
-
getOutputWriter
-
createContext
- Throws:
IOException
-
postResponse
- Throws:
IOException
-
requeue
- Throws:
IOException
-
postError
- Throws:
IOException
-
responseStream
- Throws:
IOException
-
abortGracefully
-