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, LaunchMode launchMode) -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
protected AmazonLambdaContext
createContext
(HttpURLConnection requestConnection) protected abstract LambdaInputReader
protected abstract LambdaOutputWriter
protected abstract boolean
isStream()
protected void
protected void
postResponse
(URL url, Object response) protected abstract void
processRequest
(InputStream input, OutputStream output, AmazonLambdaContext context) protected abstract Object
processRequest
(Object input, AmazonLambdaContext context) Invoke actual app code with unmarshalled input.protected void
protected HttpURLConnection
responseStream
(URL url) protected boolean
void
startPollLoop
(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, LaunchMode launchMode)
-
-
Method Details
-
shouldLog
-
isStream
protected abstract boolean isStream() -
startPollLoop
-
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
-