Package org.zkoss.zk.ui.impl

## Class EventInterceptors

- java.lang.Object
- - org.zkoss.zk.ui.impl.EventInterceptors

- All Implemented Interfaces:
    `java.io.Serializable`, `java.lang.Cloneable`

      public class EventInterceptors
      extends java.lang.Object
      implements java.lang.Cloneable, java.io.Serializable

  Utilities used to handle `EventInterceptor`.

  Thread safe.

  Since:
    3.0.0
  Author:
    tomyeh
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EventInterceptors()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addEventInterceptor​(EventInterceptor ei)` | Adds an event interceptor.
    `void` | `afterProcessEvent​(Event event)` | Invokes `EventInterceptor.afterProcessEvent(org.zkoss.zk.ui.event.Event)`
    `Event` | `beforePostEvent​(Event event)` | Invokes `EventInterceptor.beforePostEvent(org.zkoss.zk.ui.event.Event)`
    `Event` | `beforeProcessEvent​(Event event)` | Invokes `EventInterceptor.beforeProcessEvent(org.zkoss.zk.ui.event.Event)`
    `Event` | `beforeSendEvent​(Event event)` | Invokes `EventInterceptor.beforeSendEvent(org.zkoss.zk.ui.event.Event)`
    `java.lang.Object` | `clone()` |
    `boolean` | `removeEventInterceptor​(java.lang.Class klass)` | Removes an event interceptor with the specified class.
    `boolean` | `removeEventInterceptor​(EventInterceptor ei)` | Removes an event interceptor.

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

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

- - ### Constructor Detail

    - #### EventInterceptors

          public EventInterceptors()

  - ### Method Detail

    - #### addEventInterceptor

          public void addEventInterceptor​(EventInterceptor ei)

      Adds an event interceptor.

    - #### removeEventInterceptor

          public boolean removeEventInterceptor​(EventInterceptor ei)

      Removes an event interceptor.

      Note: we use the equals method to test whether two interceptors are the same.

      Returns:
        whether the listener is removed successfully.

    - #### removeEventInterceptor

          public boolean removeEventInterceptor​(java.lang.Class klass)

      Removes an event interceptor with the specified class.

      Note: we tests whether an interceptor is an instance of the specified class. At most one instance is removed.

      Returns:
        whether the listener is removed successfully.

    - #### beforeSendEvent

          public Event beforeSendEvent​(Event event)

      Invokes `EventInterceptor.beforeSendEvent(org.zkoss.zk.ui.event.Event)`

    - #### beforePostEvent

          public Event beforePostEvent​(Event event)

      Invokes `EventInterceptor.beforePostEvent(org.zkoss.zk.ui.event.Event)`

    - #### beforeProcessEvent

          public Event beforeProcessEvent​(Event event)

      Invokes `EventInterceptor.beforeProcessEvent(org.zkoss.zk.ui.event.Event)`

    - #### afterProcessEvent

          public void afterProcessEvent​(Event event)

      Invokes `EventInterceptor.afterProcessEvent(org.zkoss.zk.ui.event.Event)`

    - #### clone

          public java.lang.Object clone()

      Overrides:
        `clone` in class `java.lang.Object`