play

## Class PlayPlugin.Filter<T>

- java.lang.Object
- - play.PlayPlugin.Filter<T>

- Direct Known Subclasses:
    JPAPlugin.TransactionalFilter
  Enclosing class:
    PlayPlugin

      public abstract static class PlayPlugin.Filter<T>
      extends java.lang.Object

  Class that define a filter. A filter is a class that wrap a certain behavior around an action. You can access your Request and Response object within the filter. See the JPA plugin for an example. The JPA plugin wraps a transaction around an action. The filter applies a transaction to the current Action.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `PlayPlugin.Filter.Function1<I,O>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Filter(java.lang.String name)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `PlayPlugin.Filter.Function1<F.Function0<T>,T>` | `asFunction()`
    `PlayPlugin.Filter<T>` | `decorate(PlayPlugin.Filter<T> innerFilter)` Surround innerFilter with this.
    `java.lang.String` | `getName()`
    `abstract T` | `withinFilter(F.Function0<T> fct)`

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

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

- - ### Constructor Detail

    - #### Filter

          public Filter(java.lang.String name)

  - ### Method Detail

    - #### withinFilter

          public abstract T withinFilter(F.Function0<T> fct)
                                  throws java.lang.Throwable

      Throws:
        `java.lang.Throwable`

    - #### decorate

          public PlayPlugin.Filter<T> decorate(PlayPlugin.Filter<T> innerFilter)

      Surround innerFilter with this. (innerFilter after this)
      Parameters:
        `innerFilter` - filter to be wrapped.
      Returns:
        a new Filter object. newFilter.withinFilter(x) is outerFilter.withinFilter(innerFilter.withinFilter(x))

    - #### asFunction

          public PlayPlugin.Filter.Function1<F.Function0<T>,T> asFunction()

    - #### getName

          public java.lang.String getName()

Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly