Interface TrustedProxyManager

All Known Implementing Classes:
TrustedProxyManagerImpl

public interface TrustedProxyManager
Manages the list of trusted proxies.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addAddress(String remoteAddress)
    Adds a remote address to the list of those trusted to act as proxies.
    Returns the addresses of all the trusted proxy servers, or an empty set if there are none.
    boolean
    isTrusted(String remoteAddress)
    Returns true if the address represents a configured trusted proxy.
    void
    removeAddress(String remoteAddress)
    Removes the address of the proxy from the list of trusted proxies.
  • Method Details

    • isTrusted

      boolean isTrusted(String remoteAddress)
      Returns true if the address represents a configured trusted proxy. False otherwise.
      Parameters:
      remoteAddress - address of the proxy server
      Returns:
      true if the address is a trusted proxy
    • getAddresses

      Set<String> getAddresses()
      Returns the addresses of all the trusted proxy servers, or an empty set if there are none.
      Returns:
      addresses of all the trusted proxy servers
    • addAddress

      boolean addAddress(String remoteAddress)
      Adds a remote address to the list of those trusted to act as proxies.
      Parameters:
      remoteAddress - address of a trusted proxy
      Returns:
      true if the remoteAddress was added, false otherwise.
    • removeAddress

      void removeAddress(String remoteAddress)
      Removes the address of the proxy from the list of trusted proxies.
      Parameters:
      remoteAddress - address of the proxy