Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.portlet.filter
Interface PortletFilter

All Known Subinterfaces:
  ActionFilter, EventFilter, RenderFilter, ResourceFilter

    public interface PortletFilter

The `PortletFilter` is the base interface for all portlet filters. It provides the lifecycle methods `init` and `destroy` for putting a portlet filter into and out of service.

Since:
  2.0

Method Summary
`void` | `destroy()` Called by the portlet container to indicate to a filter that it is being taken out of service.
`void` | `init(FilterConfig filterConfig)` Called by the portlet container to indicate to a filter that it is being placed into service.

Method Detail

### init

    void init(FilterConfig filterConfig)
              throws PortletException

  Called by the portlet container to indicate to a filter that it is being placed into service. The portlet container calls the init method exactly once after instantiating the filter. The init method must complete successfully before the filter is asked to do any filtering work.

  The portlet container cannot place the filter into service if the init method either

  - throws a PortletException
  - does not return within a time period defined by the portlet container

  Parameters
    `filterConfig` - the filter configuration data defined in the portlet deployment descriptor
  Throws
    `PortletException` - if an error occurs in the filter initialization

### destroy

    void destroy()

  Called by the portlet container to indicate to a filter that it is being taken out of service. This method is only called once all threads within the filter's `doFilter` method have exited or after a timeout period has passed.

  After the portlet container calls this method, it will not call the `doFilter` method again on this instance of the filter.

  This method gives the filter an opportunity to clean up any resources that are being held (for example, memory, file handles, threads) and make sure that any persistent state is synchronized with the filter's current state in memory.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.