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
  • 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 context
      conversionService - The conversion service
      ioExecutor - 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 context
      conversionService - 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 the DefaultServletExchange object.
      Specified by:
      createExchange in class ServletHttpHandler<jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse>
      Parameters:
      request - The request
      response - 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 class ServletHttpHandler<jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse>
      Parameters:
      request - The request
      response - The response
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface io.micronaut.context.LifeCycle<ServletHttpHandler<jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse>>
      Overrides:
      isRunning in class ServletHttpHandler<jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse>