## com.sun.jersey.api.client.filter
Class Filterable

    java.lang.Object
      com.sun.jersey.api.client.filter.Filterable

Direct Known Subclasses:
  AsyncViewResource, AsyncWebResource, Client, ViewResource, WebResource

    public abstract class Filterable

extends java.lang.Object

An abstract class providing support for registering and managing a chain of `ClientFilter` instances.

A `ClientFilter` instance MUST be occur at most once in any `Filterable` instance, otherwise unexpected results may occur. If it is necessary to add the same type of `ClientFilter` more than once to the same `Filterable` instance or to more than one `Filterable` instance then a new instance of that `ClientFilter` MUST be added.

Author:
  Paul Sandoz

Constructor Summary
`protected` | `Filterable(ClientHandler root)` Construct with a root client handler.
`protected` | `Filterable(Filterable that)` Construct from an existing filterable instance.

Method Summary
`void` | `addFilter(ClientFilter f)` Add a filter to the filter chain.
`ClientHandler` | `getHeadHandler()` Get the head client handler of the filter chain.
`boolean` | `isFilterPresent(ClientFilter filter)` Check if a filter is present in the chain.
`boolean` | `isFilterPreset(ClientFilter filter)` Deprecated. use `isFilterPresent(ClientFilter)` instead.
`void` | `removeAllFilters()` Remove all filters from the filter chain.
`void` | `removeFilter(ClientFilter f)` Remove a filter from the chain.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Filterable

    protected Filterable(ClientHandler root)

  Construct with a root client handler.

  Parameters:
    `root` - the root handler to handle the request and return a response.

### Filterable

    protected Filterable(Filterable that)

  Construct from an existing filterable instance.

  Parameters:
    `that` - the filter to copy.

Method Detail

### addFilter

    public void addFilter(ClientFilter f)

  Add a filter to the filter chain.

  Parameters:
    `f` - the filter to add.

### removeFilter

    public void removeFilter(ClientFilter f)

  Remove a filter from the chain.

  Parameters:
    `f` - the filter to remove.

### isFilterPreset

    @Deprecated
    public boolean isFilterPreset(ClientFilter filter)

  Deprecated. use `isFilterPresent(ClientFilter)` instead.

  Check if a filter is present in the chain.

  Parameters:
    `filter` - the filter to remove.
  Returns:
    return `true` if the filter is present, otherwise `false`.

### isFilterPresent

    public boolean isFilterPresent(ClientFilter filter)

  Check if a filter is present in the chain.

  Parameters:
    `filter` - the filter to remove.
  Returns:
    return `true` if the filter is present, otherwise `false`.

### removeAllFilters

    public void removeAllFilters()

  Remove all filters from the filter chain.

### getHeadHandler

    public ClientHandler getHeadHandler()

  Get the head client handler of the filter chain.

  Returns:
    the head client handler of the filter chain.

Copyright © 2017 Oracle Corporation. All Rights Reserved.