AbstractFeature (Apache CXF JavaDoc 3.6.11 API)

Package org.apache.cxf.feature

## Class AbstractFeature

- java.lang.Object
- - javax.xml.ws.WebServiceFeature
  - - org.apache.cxf.feature.AbstractFeature

- All Implemented Interfaces:
    `AbstractPortableFeature`, `Feature`
  Direct Known Subclasses:
    `DelegatingFeature`, `WrappedFeature`, `WSAddressingFeature`

      public abstract class AbstractFeature
      extends javax.xml.ws.WebServiceFeature
      implements AbstractPortableFeature

  A Feature is something that is able to customize a Server, Client, or Bus, typically adding capabilities. For instance, there may be a LoggingFeature which configures one of the above to log each of their messages.

  By default the initialize methods all delegate to initializeProvider(InterceptorProvider). If you're simply adding interceptors to a Server, Client, or Bus, this allows you to add them easily.

- - ### Field Summary

    - ### Fields inherited from class javax.xml.ws.WebServiceFeature

      `enabled`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `doInitializeProvider​(InterceptorProvider provider, Bus bus)` |
    `static <T> T` | `getActive​(List<? extends Feature> features, Class<T> type)` | Convenience method to extract a feature by type from an active list.
    `String` | `getID()` |
    `protected void` | `initializeProvider​(InterceptorProvider provider, Bus bus)` |
    `boolean` | `isEnabled()` |

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

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

    - ### Methods inherited from interface org.apache.cxf.feature.AbstractPortableFeature

      `initialize, initialize, initialize, initialize`

- - ### Constructor Detail

    - #### AbstractFeature

          public AbstractFeature()

  - ### Method Detail

    - #### getID

          public String getID()

      Specified by:
        `getID` in class `javax.xml.ws.WebServiceFeature`

    - #### isEnabled

          public boolean isEnabled()

      Overrides:
        `isEnabled` in class `javax.xml.ws.WebServiceFeature`

    - #### doInitializeProvider

          public void doInitializeProvider​(InterceptorProvider provider,
                                           Bus bus)

      Specified by:
        `doInitializeProvider` in interface `AbstractPortableFeature`

    - #### initializeProvider

          protected void initializeProvider​(InterceptorProvider provider,
                                            Bus bus)

    - #### getActive

          public static <T> T getActive​(List<? extends Feature> features,
                                        Class<T> type)

      Description copied from interface: `AbstractPortableFeature`
      Convenience method to extract a feature by type from an active list.
      Parameters:
        `features` - the given feature list
        `type` - the feature type required
      Returns:
        the feature of the specified type if active