public class MicronautLambdaRuntime
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static io.micronaut.http.uri.UriTemplate |
ERROR_TEMPLATE |
static java.lang.String |
HEADER_RUNTIME_AWS_REQUEST_ID |
static java.lang.String |
INIT_ERROR_URI |
static io.micronaut.http.uri.UriTemplate |
INVOCATION_TEMPLATE |
static java.lang.String |
NEXT_INVOCATION_URI |
Constructor and Description |
---|
MicronautLambdaRuntime() |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String... args)
Main entry point.
|
void |
startRuntimeApiEventLoop(io.micronaut.context.ApplicationContextBuilder applicationContextBuilder)
Starts the runtime API event loop.
|
void |
startRuntimeApiEventLoop(java.net.URL runtimeApiURL,
io.micronaut.context.ApplicationContextBuilder applicationContextBuilder)
Starts the runtime API event loop.
|
void |
startRuntimeApiEventLoop(java.net.URL runtimeApiURL,
io.micronaut.context.ApplicationContextBuilder applicationContextBuilder,
java.util.function.Predicate<java.net.URL> loopUntil)
Starts the runtime API event loop.
|
public static final java.lang.String HEADER_RUNTIME_AWS_REQUEST_ID
public static final io.micronaut.http.uri.UriTemplate INVOCATION_TEMPLATE
public static final io.micronaut.http.uri.UriTemplate ERROR_TEMPLATE
public static final java.lang.String NEXT_INVOCATION_URI
public static final java.lang.String INIT_ERROR_URI
public static void main(java.lang.String... args) throws java.lang.Exception
args
- The argumentsjava.lang.Exception
- If an error occurs initializing the custom runtimepublic void startRuntimeApiEventLoop(@Nonnull io.micronaut.context.ApplicationContextBuilder applicationContextBuilder) throws java.net.MalformedURLException
applicationContextBuilder
- The context builderjava.net.MalformedURLException
- if the lambda endpoint URL is malformedpublic void startRuntimeApiEventLoop(@Nonnull java.net.URL runtimeApiURL, @Nonnull io.micronaut.context.ApplicationContextBuilder applicationContextBuilder)
runtimeApiURL
- The runtime API URL.applicationContextBuilder
- The context builderpublic void startRuntimeApiEventLoop(@Nonnull java.net.URL runtimeApiURL, @Nonnull io.micronaut.context.ApplicationContextBuilder applicationContextBuilder, @Nonnull java.util.function.Predicate<java.net.URL> loopUntil)
runtimeApiURL
- The runtime API URL.applicationContextBuilder
- The context builderloopUntil
- A predicate that allows controlling when the event loop should exit