I - the input type parameterO - the output type parameterpublic abstract class JacksonSpringRequestHandler<I,O> extends SpringRequestStreamHandler
ObjectMapper which can handle any special JSON parsing behavior.
To make use of this class, implement the
ApplicationContextProvider.getApplicationContext() method to provide
a Spring ApplicationContext, and then
register a bean of type RequestHandler with the same type
parameters.
| Modifier | Constructor and Description |
|---|---|
protected |
JacksonSpringRequestHandler(java.lang.Class<I> inputClass)
To work around type erasure, pass the input type class here.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper()
Must be implemented to return the
ObjectMapper to be used in
serialization/deserialization. |
void |
handleRequest(java.io.InputStream input,
java.io.OutputStream output,
com.amazonaws.services.lambda.runtime.Context context) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetApplicationContextprotected JacksonSpringRequestHandler(@NotNull
java.lang.Class<I> inputClass)
inputClass - the class of this class's input type parameter, I.protected abstract com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
ObjectMapper to be used in
serialization/deserialization.public void handleRequest(@NotNull
java.io.InputStream input,
@NotNull
java.io.OutputStream output,
@NotNull
com.amazonaws.services.lambda.runtime.Context context)
throws java.io.IOException
handleRequest in interface com.amazonaws.services.lambda.runtime.RequestStreamHandlerhandleRequest in class SpringRequestStreamHandlerjava.io.IOException