Package io.micronaut.servlet.engine
Class DefaultServletHttpHandler
java.lang.Object
io.micronaut.servlet.http.ServletHttpHandler<jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse>
io.micronaut.servlet.engine.DefaultServletHttpHandler
- All Implemented Interfaces:
io.micronaut.context.LifeCycle<ServletHttpHandler<jakarta.servlet.http.HttpServletRequest,
,jakarta.servlet.http.HttpServletResponse>> Closeable
,AutoCloseable
@Singleton
public class DefaultServletHttpHandler
extends ServletHttpHandler<jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse>
Default implementation of
ServletHttpHandler
for the Servlet API.- Since:
- 1.0.0
- Author:
- graemerocher
-
Field Summary
Fields inherited from class io.micronaut.servlet.http.ServletHttpHandler
applicationContext, LOG
-
Constructor Summary
ConstructorDescriptionDefaultServletHttpHandler
(io.micronaut.context.ApplicationContext applicationContext) Deprecated.DefaultServletHttpHandler
(io.micronaut.context.ApplicationContext applicationContext, io.micronaut.core.convert.ConversionService conversionService) DefaultServletHttpHandler
(io.micronaut.context.ApplicationContext applicationContext, io.micronaut.core.convert.ConversionService conversionService, Executor ioExecutor) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected ServletExchange<jakarta.servlet.http.HttpServletRequest,
jakarta.servlet.http.HttpServletResponse> createExchange
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Creates theDefaultServletExchange
object.boolean
void
service
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Handle the give native request and response.Methods inherited from class io.micronaut.servlet.http.ServletHttpHandler
close, exchange, exchange, getApplicationContext, getMediaTypeCodecRegistry, service, 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.context.LifeCycle
refresh
-
Constructor Details
-
DefaultServletHttpHandler
public DefaultServletHttpHandler(io.micronaut.context.ApplicationContext applicationContext, io.micronaut.core.convert.ConversionService conversionService, @Named("blocking") Executor ioExecutor) Default constructor.- Parameters:
applicationContext
- The application contextconversionService
- The conversion serviceioExecutor
- Executor to use for blocking IO operations
-
DefaultServletHttpHandler
@Deprecated public DefaultServletHttpHandler(io.micronaut.context.ApplicationContext applicationContext, io.micronaut.core.convert.ConversionService conversionService) Default constructor.- Parameters:
applicationContext
- The application contextconversionService
- The conversion service
-
DefaultServletHttpHandler
@Deprecated public DefaultServletHttpHandler(io.micronaut.context.ApplicationContext applicationContext) Default constructor.- Parameters:
applicationContext
- The application context
-
-
Method Details
-
createExchange
protected ServletExchange<jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse> createExchange(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Description copied from class:ServletHttpHandler
Creates theDefaultServletExchange
object.- Specified by:
createExchange
in classServletHttpHandler<jakarta.servlet.http.HttpServletRequest,
jakarta.servlet.http.HttpServletResponse> - Parameters:
request
- The requestresponse
- The response- Returns:
- The exchange object
-
service
public void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Description copied from class:ServletHttpHandler
Handle the give native request and response.- Overrides:
service
in classServletHttpHandler<jakarta.servlet.http.HttpServletRequest,
jakarta.servlet.http.HttpServletResponse> - Parameters:
request
- The requestresponse
- The response
-
isRunning
public boolean isRunning()- Specified by:
isRunning
in interfaceio.micronaut.context.LifeCycle<ServletHttpHandler<jakarta.servlet.http.HttpServletRequest,
jakarta.servlet.http.HttpServletResponse>> - Overrides:
isRunning
in classServletHttpHandler<jakarta.servlet.http.HttpServletRequest,
jakarta.servlet.http.HttpServletResponse>
-
DefaultServletHttpHandler(ApplicationContext, ConversionService, Executor)