Package org.apache.felix.http.base.internal.handler

# Class FilterHandler

java.lang.Object
org.apache.felix.http.base.internal.handler.FilterHandler

All Implemented Interfaces:
  `Comparable<FilterHandler>`

public class FilterHandler extends Object implements Comparable<FilterHandler>
The filter handler handles the initialization and destruction of filter objects.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected int`
`useCount`

## Constructor Summary

Constructors
Constructor
Description
`FilterHandler(long contextServiceId, ExtServletContext context, FilterInfo filterInfo, org.osgi.framework.BundleContext bundleContext)`

## Method Summary

Modifier and Type
Method
Description
`int`
`compareTo(FilterHandler other)`
`boolean`
`destroy()`
`boolean`
`dispose()`
`boolean`
`equals(Object obj)`
`ExtServletContext`
`getContext()`
`long`
`getContextServiceId()`
`jakarta.servlet.Filter`
`getFilter()`
`FilterInfo`
`getFilterInfo()`
`String`
`getName()`
`void`
`handle(@NotNull jakarta.servlet.ServletRequest req, @NotNull jakarta.servlet.ServletResponse res, @NotNull jakarta.servlet.FilterChain chain)`
`int`
`hashCode()`
`int`
`init()`
Initialize the object

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

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

## Field Details

### useCount

protected volatile int useCount

## Constructor Details

### FilterHandler

public FilterHandler(long contextServiceId, ExtServletContext context, FilterInfo filterInfo, org.osgi.framework.BundleContext bundleContext)

## Method Details

### compareTo

public int compareTo(FilterHandler other)

Specified by:
  `compareTo` in interface `Comparable<FilterHandler>`

### getContextServiceId

public long getContextServiceId()

### getContext

public ExtServletContext getContext()

### getFilter

public jakarta.servlet.Filter getFilter()

### getFilterInfo

public FilterInfo getFilterInfo()

### getName

public String getName()

### init

public int init()
Initialize the object

Returns:
  {code -1} on success, a failure reason according to `DTOConstants` otherwise.

### handle

public void handle(@NotNull @NotNull jakarta.servlet.ServletRequest req, @NotNull @NotNull jakarta.servlet.ServletResponse res, @NotNull @NotNull jakarta.servlet.FilterChain chain) throws jakarta.servlet.ServletException, IOException

Throws:
  `jakarta.servlet.ServletException`
  `IOException`

### destroy

public boolean destroy()

### dispose

public boolean dispose()

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`