Package io.quarkus.amazon.lambda.runtime
Class AbstractLambdaPollLoop
- java.lang.Object
-
- io.quarkus.amazon.lambda.runtime.AbstractLambdaPollLoop
-
public abstract class AbstractLambdaPollLoop extends Object
-
-
Constructor Summary
Constructors Constructor Description AbstractLambdaPollLoop(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.fasterxml.jackson.databind.ObjectReader cognitoIdReader, com.fasterxml.jackson.databind.ObjectReader clientCtxReader)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) boolean
abortGracefully(Exception ex)
protected AmazonLambdaContext
createContext(HttpURLConnection requestConnection)
protected abstract LambdaInputReader
getInputReader()
protected abstract LambdaOutputWriter
getOutputWriter()
protected abstract boolean
isStream()
protected void
postError(URL url, Object response)
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 HttpURLConnection
responseStream(URL url)
void
startPollLoop(ShutdownContext context)
-
-
-
Method Detail
-
isStream
protected abstract boolean isStream()
-
startPollLoop
public void startPollLoop(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
protected abstract LambdaInputReader getInputReader()
-
getOutputWriter
protected abstract LambdaOutputWriter getOutputWriter()
-
createContext
protected AmazonLambdaContext createContext(HttpURLConnection requestConnection) throws IOException
- Throws:
IOException
-
postResponse
protected void postResponse(URL url, Object response) throws IOException
- Throws:
IOException
-
postError
protected void postError(URL url, Object response) throws IOException
- Throws:
IOException
-
responseStream
protected HttpURLConnection responseStream(URL url) throws IOException
- Throws:
IOException
-
abortGracefully
boolean abortGracefully(Exception ex)
-
-