Package io.micronaut.http.poja.apache
Class ApacheServerlessApplication
java.lang.Object
io.micronaut.http.poja.PojaHttpServerlessApplication<ApacheServletHttpRequest<?>,ApacheServletHttpResponse<?>>
io.micronaut.http.poja.apache.ApacheServerlessApplication
- All Implemented Interfaces:
io.micronaut.context.ApplicationContextLifeCycle<PojaHttpServerlessApplication<ApacheServletHttpRequest<?>,
,ApacheServletHttpResponse<?>>> io.micronaut.context.ApplicationContextProvider
,io.micronaut.context.LifeCycle
,io.micronaut.runtime.EmbeddedApplication<PojaHttpServerlessApplication<ApacheServletHttpRequest<?>,
,ApacheServletHttpResponse<?>>> Closeable
,AutoCloseable
@Singleton
public class ApacheServerlessApplication
extends PojaHttpServerlessApplication<ApacheServletHttpRequest<?>,ApacheServletHttpResponse<?>>
Implementation of
PojaHttpServerlessApplication
for Apache.- Since:
- 4.10.0
- Author:
- Andriy Dmytruk.
-
Constructor Summary
ConstructorDescriptionApacheServerlessApplication
(io.micronaut.context.ApplicationContext applicationContext, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
handleSingleRequest
(ServletHttpHandler<ApacheServletHttpRequest<?>, ApacheServletHttpResponse<?>> servletHttpHandler, InputStream in, OutputStream out) Handle a single request.protected boolean
Whether to use the inherited channel by default.Methods inherited from class io.micronaut.http.poja.PojaHttpServerlessApplication
getApplicationConfiguration, getApplicationContext, isRunning, runIndefinitely, start, start, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.runtime.EmbeddedApplication
getEnvironment, isForceExit, isServer
Methods 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 void handleSingleRequest(ServletHttpHandler<ApacheServletHttpRequest<?>, ApacheServletHttpResponse<?>> servletHttpHandler, InputStream in, OutputStream out) throws IOExceptionDescription copied from class:PojaHttpServerlessApplication
Handle a single request.- Specified by:
handleSingleRequest
in classPojaHttpServerlessApplication<ApacheServletHttpRequest<?>,
ApacheServletHttpResponse<?>> - Parameters:
servletHttpHandler
- The handlerin
- The input streamout
- The output stream- Throws:
IOException
- IO exception
-
useInheritedChannel
protected boolean useInheritedChannel()Description copied from class:PojaHttpServerlessApplication
Whether to use the inherited channel by default. If false, STDIN and STDOUT will be used directly instead.- Overrides:
useInheritedChannel
in classPojaHttpServerlessApplication<ApacheServletHttpRequest<?>,
ApacheServletHttpResponse<?>> - Returns:
- Whether to use the inherited channel
-