Package org.zkoss.web.util.resource

## Interface Extendlet

- All Known Implementing Classes:
    `DspExtendlet`, `WcsExtendlet`, `WpdExtendlet`, `ZumlExtendlet`

      public interface Extendlet

  A plugin of `ClassWebResource` to process particular content.

  To add a resource processor to `ClassWebResource`, use `ClassWebResource.addExtendlet(java.lang.String, org.zkoss.web.util.resource.Extendlet)`.

  Since:
    2.4.1
  Author:
    tomyeh
  See Also:
    `ClassWebResource.addExtendlet(java.lang.String, org.zkoss.web.util.resource.Extendlet)`

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `ALLOW_DIRECT_INCLUDE` | Used with `getFeature(int)` to indicate the extendlet can be included directly without going thru Web container.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `getFeature​(int feature)` | Returns if the specified feature is supported.
    `void` | `init​(ExtendletConfig config)` | Initializes the resource processor.
    `void` | `service​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String path)` | Process the specified request.

- - ### Field Detail

    - #### ALLOW_DIRECT_INCLUDE

          static final int ALLOW_DIRECT_INCLUDE

      Used with `getFeature(int)` to indicate the extendlet can be included directly without going thru Web container.

      In other words, if getFeature(ALLOW_DIRECT_INCLUDE) is true and a corresponding page is included, then `service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)` will be invoked directly (rather than calling RequestDispatcher's include method.

      Since:
        3.5.2
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### init

          void init​(ExtendletConfig config)

      Initializes the resource processor.

    - #### getFeature

          boolean getFeature​(int feature)

      Returns if the specified feature is supported.
      Since:
        3.5.2

    - #### service

          void service​(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response,
                       java.lang.String path)
                throws javax.servlet.ServletException,
                       java.io.IOException

      Process the specified request.
      Parameters:
        `path` - the path mapped to this resource processor.
      Throws:
        `javax.servlet.ServletException`
        `java.io.IOException`
      Since:
        5.0.0