Package org.springframework.security.web

# Class FilterInvocation

java.lang.Object
org.springframework.security.web.FilterInvocation

public class FilterInvocation extends Object
Holds objects associated with a HTTP filter.

Guarantees the request and response are instances of `HttpServletRequest` and `HttpServletResponse`, and that there are no `null` objects.

Required so that security system classes can obtain access to the filter environment, as well as the request and response.

## Constructor Summary

Constructors
Constructor
Description
`FilterInvocation(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain)`
`FilterInvocation(String servletPath, String method)`
`FilterInvocation(String contextPath, String servletPath, String method)`
`FilterInvocation(String contextPath, String servletPath, String method, jakarta.servlet.ServletContext servletContext)`
`FilterInvocation(String contextPath, String servletPath, String pathInfo, String query, String method)`
`FilterInvocation(String contextPath, String servletPath, String pathInfo, String query, String method, jakarta.servlet.ServletContext servletContext)`

## Method Summary

Modifier and Type
Method
Description
`jakarta.servlet.FilterChain`
`getChain()`
`String`
`getFullRequestUrl()`
Indicates the URL that the user agent used for this request.
`jakarta.servlet.http.HttpServletRequest`
`getHttpRequest()`
`jakarta.servlet.http.HttpServletResponse`
`getHttpResponse()`
`jakarta.servlet.http.HttpServletRequest`
`getRequest()`
`String`
`getRequestUrl()`
Obtains the web application-specific fragment of the URL.
`jakarta.servlet.http.HttpServletResponse`
`getResponse()`
`String`
`toString()`

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

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

## Constructor Details

### FilterInvocation

public FilterInvocation(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain)

### FilterInvocation

public FilterInvocation(String servletPath, String method)

### FilterInvocation

public FilterInvocation(String contextPath, String servletPath, String method)

### FilterInvocation

public FilterInvocation(String contextPath, String servletPath, String method, jakarta.servlet.ServletContext servletContext)

### FilterInvocation

public FilterInvocation(String contextPath, String servletPath, String pathInfo, String query, String method)

### FilterInvocation

public FilterInvocation(String contextPath, String servletPath, String pathInfo, String query, String method, jakarta.servlet.ServletContext servletContext)

## Method Details

### getChain

public jakarta.servlet.FilterChain getChain()

### getFullRequestUrl

public String getFullRequestUrl()
Indicates the URL that the user agent used for this request.

The returned URL does not reflect the port number determined from a `PortResolver`.

Returns:
  the full URL of this request

### getHttpRequest

public jakarta.servlet.http.HttpServletRequest getHttpRequest()

### getHttpResponse

public jakarta.servlet.http.HttpServletResponse getHttpResponse()

### getRequestUrl

public String getRequestUrl()
Obtains the web application-specific fragment of the URL.

Returns:
  the URL, excluding any server name, context path or servlet path

### getRequest

public jakarta.servlet.http.HttpServletRequest getRequest()

### getResponse

public jakarta.servlet.http.HttpServletResponse getResponse()

### toString

public String toString()

Overrides:
  `toString` in class `Object`