Package org.apache.sling.engine

# Interface SlingRequestProcessor

@ProviderType public interface SlingRequestProcessor
The `SlingRequestProcessor` interface defines the service which may be called to handle HTTP requests.

This interface is implemented by this bundle and is not intended to be implemented by bundles other than this.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`NAME`
The name of the `SlingRequestProcessor` service.

## Method Summary

Modifier and Type
Method
Description
`void`
`processRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.apache.sling.api.resource.ResourceResolver resourceResolver)`
Process an HTTP request through the Sling request processing engine.
`void`
`processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.sling.api.resource.ResourceResolver resourceResolver)`
Deprecated.
Use `processRequest(HttpServletRequest, HttpServletResponse, ResourceResolver)`

## Field Details

### NAME

static final String NAME
The name of the `SlingRequestProcessor` service.

## Method Details

### processRequest

void processRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.apache.sling.api.resource.ResourceResolver resourceResolver) throws IOException
Process an HTTP request through the Sling request processing engine.

This method does not close the provided resource resolver!

The org.apache.sling.servlet-helpers module provides synthetic request/response classes which can be useful when using this service.

Parameters:
  `request` - Usually a "synthetic" request, i.e. not supplied by servlet container
  `response` - Usually a "synthetic" response, i.e. not supplied by servlet container
  `resourceResolver` - The `ResourceResolver` used for the Sling request processing.
Throws:
  `NullPointerException` - if either of the parameters is `null`
  `IOException` - if an error occurrs reading from the request input or writing the response
Since:
  2.7.0

### processRequest

@Deprecated void processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.sling.api.resource.ResourceResolver resourceResolver) throws javax.servlet.ServletException, IOException
Deprecated.
Use `processRequest(HttpServletRequest, HttpServletResponse, ResourceResolver)`
Process an HTTP request through the Sling request processing engine.

This method does not close the provided resource resolver!

The org.apache.sling.servlet-helpers module provides synthetic request/response classes which can be useful when using this service.

Parameters:
  `request` - Usually a "synthetic" request, i.e. not supplied by servlet container
  `response` - Usually a "synthetic" response, i.e. not supplied by servlet container
  `resourceResolver` - The `ResourceResolver` used for the Sling request processing.
Throws:
  `NullPointerException` - if either of the parameters is `null`
  `IOException` - if an error occurrs reading from the request input or writing the response
  `javax.servlet.ServletException` - if another servlet related problem occurrs