Package io.micronaut.http.poja.apache
Class ApacheServerlessApplication
java.lang.Object
io.micronaut.http.poja.PojaHttpServerlessApplication<ApacheServletHttpRequest<?>,io.micronaut.http.poja.apache.ApacheServletHttpResponse<?>>
io.micronaut.http.poja.apache.ApacheServerlessApplication
- All Implemented Interfaces:
io.micronaut.context.ApplicationContextLifeCycle<PojaHttpServerlessApplication<ApacheServletHttpRequest<?>,,io.micronaut.http.poja.apache.ApacheServletHttpResponse<?>>> io.micronaut.context.ApplicationContextProvider,io.micronaut.context.LifeCycle,io.micronaut.runtime.EmbeddedApplication<PojaHttpServerlessApplication<ApacheServletHttpRequest<?>,,io.micronaut.http.poja.apache.ApacheServletHttpResponse<?>>> Closeable,AutoCloseable
@Singleton
public class ApacheServerlessApplication
extends PojaHttpServerlessApplication<ApacheServletHttpRequest<?>,io.micronaut.http.poja.apache.ApacheServletHttpResponse<?>>
Implementation of
PojaHttpServerlessApplication for Apache.- Since:
- 4.10.0
- Author:
- Andriy Dmytruk.
-
Constructor Summary
ConstructorsConstructorDescriptionApacheServerlessApplication(io.micronaut.context.ApplicationContext applicationContext, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanhandleSingleRequest(ServletHttpHandler<ApacheServletHttpRequest<?>, io.micronaut.http.poja.apache.ApacheServletHttpResponse<?>> servletHttpHandler, InputStream in, OutputStream out) Handle a single request.protected booleanWhether to use the inherited channel by default.Methods inherited from class io.micronaut.http.poja.PojaHttpServerlessApplication
getApplicationConfiguration, getApplicationContext, isRunning, runIndefinitely, start, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.runtime.EmbeddedApplication
getEnvironment, isForceExit, isServer, isShutdownHookNeededMethods inherited from interface io.micronaut.context.LifeCycle
close, refresh
-
Constructor Details
-
ApacheServerlessApplication
public ApacheServerlessApplication(io.micronaut.context.ApplicationContext applicationContext, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration) Default constructor.- Parameters:
applicationContext- The application contextapplicationConfiguration- The application configuration
-
-
Method Details
-
handleSingleRequest
protected boolean handleSingleRequest(ServletHttpHandler<ApacheServletHttpRequest<?>, io.micronaut.http.poja.apache.ApacheServletHttpResponse<?>> servletHttpHandler, InputStream in, OutputStream out) throws IOExceptionDescription copied from class:PojaHttpServerlessApplicationHandle a single request.- Specified by:
handleSingleRequestin classPojaHttpServerlessApplication<ApacheServletHttpRequest<?>,io.micronaut.http.poja.apache.ApacheServletHttpResponse<?>> - Parameters:
servletHttpHandler- The handlerin- The input streamout- The output stream- Returns:
trueiff more requests can come in,falsewhen the connection should be closed- Throws:
IOException- IO exception
-
useInheritedChannel
protected boolean useInheritedChannel()Description copied from class:PojaHttpServerlessApplicationWhether to use the inherited channel by default. If false, STDIN and STDOUT will be used directly instead.- Overrides:
useInheritedChannelin classPojaHttpServerlessApplication<ApacheServletHttpRequest<?>,io.micronaut.http.poja.apache.ApacheServletHttpResponse<?>> - Returns:
- Whether to use the inherited channel
-