Package org.apache.sling.api.request

# Class SlingJakartaRequestEvent

java.lang.Object
org.apache.sling.api.request.SlingJakartaRequestEvent

public class SlingJakartaRequestEvent extends Object
represents an event published by the Sling engine while dispatching a request.

This class is not intended to be extended or instantiated by clients.

Since:
  2.8.0
See Also:
  - `SlingJakartaRequestListener`

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`SlingJakartaRequestEvent.EventType`
type of the event

## Constructor Summary

Constructors
Constructor
Description
`SlingJakartaRequestEvent(jakarta.servlet.ServletContext sc, jakarta.servlet.ServletRequest request, SlingJakartaRequestEvent.EventType type)`

## Method Summary

Modifier and Type
Method
Description
`jakarta.servlet.ServletContext`
`getServletContext()`
Gets the actual servlet context object as `ServletContext`
`jakarta.servlet.ServletRequest`
`getServletRequest()`
Gets the actual request object as `ServletRequest`
`SlingJakartaRequestEvent.EventType`
`getType()`
get the type of the event, eg.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SlingJakartaRequestEvent

public SlingJakartaRequestEvent(jakarta.servlet.ServletContext sc, jakarta.servlet.ServletRequest request, SlingJakartaRequestEvent.EventType type)

## Method Details

### getServletContext

public jakarta.servlet.ServletContext getServletContext()
Gets the actual servlet context object as `ServletContext`

Returns:
  the actual servlet context.

### getServletRequest

public jakarta.servlet.ServletRequest getServletRequest()
Gets the actual request object as `ServletRequest`

Returns:
  the actual request object as `ServletRequest`

### getType

public SlingJakartaRequestEvent.EventType getType()
get the type of the event, eg. EVENT_INIT or EVENT_DESTROY

Returns:
  the type of the event as `EventType`, eg. EVENT_INIT or EVENT_DESTROY