RemoteHostFilter (Apache Tomcat 8.5.57 API Documentation)

org.apache.catalina.filters

## Class RemoteHostFilter

- java.lang.Object
- - org.apache.catalina.filters.FilterBase
  - - org.apache.catalina.filters.RequestFilter
    - - org.apache.catalina.filters.RemoteHostFilter

- All Implemented Interfaces:
    Filter

      public final class RemoteHostFilter
      extends RequestFilter

  Concrete implementation of `RequestFilter` that filters based on the remote client's host name.
  Author:
    Craig R. McClanahan

- - ### Field Summary

    - ### Fields inherited from class org.apache.catalina.filters.RequestFilter

      `allow, deny, denyStatus`

    - ### Fields inherited from class org.apache.catalina.filters.FilterBase

      `sm`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RemoteHostFilter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `doFilter(ServletRequest request, ServletResponse response, FilterChain chain)` Extract the desired request property, and pass it (along with the specified request and response objects and associated filter chain) to the protected `process()` method to perform the actual filtering.
    `protected Log` | `getLogger()`

    - ### Methods inherited from class org.apache.catalina.filters.RequestFilter

      `getAllow, getDeny, getDenyStatus, isConfigProblemFatal, process, setAllow, setDeny, setDenyStatus`

    - ### Methods inherited from class org.apache.catalina.filters.FilterBase

      `destroy, init`

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

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

- - ### Constructor Detail

    - #### RemoteHostFilter

          public RemoteHostFilter()

  - ### Method Detail

    - #### doFilter

          public void doFilter(ServletRequest request,
                      ServletResponse response,
                      FilterChain chain)
                        throws IOException,
                               ServletException

      Extract the desired request property, and pass it (along with the specified request and response objects and associated filter chain) to the protected `process()` method to perform the actual filtering.
      Specified by:
        `doFilter` in interface `Filter`
      Specified by:
        `doFilter` in class `RequestFilter`
      Parameters:
        `request` - The servlet request to be processed
        `response` - The servlet response to be created
        `chain` - The filter chain for this request
      Throws:
        `IOException` - if an input/output error occurs
        `ServletException` - if a servlet error occurs

    - #### getLogger

          protected Log getLogger()

      Specified by:
        `getLogger` in class `FilterBase`

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.