public abstract class AbstractLambdaPollLoop extends Object
| Constructor and Description |
|---|
AbstractLambdaPollLoop(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
com.fasterxml.jackson.databind.ObjectReader cognitoIdReader,
com.fasterxml.jackson.databind.ObjectReader clientCtxReader) |
| Modifier and Type | Method and Description |
|---|---|
(package private) boolean |
abortGracefully(Exception ex) |
protected AmazonLambdaContext |
createContext(HttpURLConnection requestConnection) |
protected abstract com.fasterxml.jackson.databind.ObjectReader |
getInputReader() |
protected abstract com.fasterxml.jackson.databind.ObjectWriter |
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) |
public AbstractLambdaPollLoop(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
com.fasterxml.jackson.databind.ObjectReader cognitoIdReader,
com.fasterxml.jackson.databind.ObjectReader clientCtxReader)
protected abstract boolean isStream()
public void startPollLoop(ShutdownContext context)
protected abstract Object processRequest(Object input, AmazonLambdaContext context) throws Exception
input - unmarshalled input (probably from json)context - Exceptionprotected abstract void processRequest(InputStream input, OutputStream output, AmazonLambdaContext context) throws Exception
Exceptionprotected abstract com.fasterxml.jackson.databind.ObjectReader getInputReader()
protected abstract com.fasterxml.jackson.databind.ObjectWriter getOutputWriter()
protected AmazonLambdaContext createContext(HttpURLConnection requestConnection) throws IOException
IOExceptionprotected void postResponse(URL url, Object response) throws IOException
IOExceptionprotected void postError(URL url, Object response) throws IOException
IOExceptionprotected HttpURLConnection responseStream(URL url) throws IOException
IOExceptionboolean abortGracefully(Exception ex)
Copyright © 2020 JBoss by Red Hat. All rights reserved.