Apache CXF API

org.apache.cxf.feature
Class AbstractFeature

java.lang.Object
  extended by org.apache.cxf.feature.AbstractFeature
All Implemented Interfaces:
Feature
Direct Known Subclasses:
CertConstraintsFeature, ColocFeature, FailoverFeature, FastInfosetFeature, GZIPFeature, JavascriptOptionsFeature, JMSConfigFeature, LoggingFeature, PolicyEngineBPDefinitionParser.PolicyEngineConfig, ResponseTimeFeature, RMFeature, StaxDataBindingFeature, StaxTransformFeature, WrappedFeature, WSAddressingFeature, WSPolicyFeature

public abstract class AbstractFeature
extends Object
implements Feature

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.


Constructor Summary
AbstractFeature()
           
 
Method Summary
static
<T> T
getActive(List<? extends Feature> features, Class<T> type)
          Convenience method to extract a feature by type from an active list.
 void initialize(Bus bus)
           
 void initialize(Client client, Bus bus)
           
 void initialize(InterceptorProvider interceptorProvider, Bus bus)
           
 void initialize(Server server, Bus bus)
           
protected  void initializeProvider(InterceptorProvider provider, Bus bus)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFeature

public AbstractFeature()
Method Detail

initialize

public void initialize(Server server,
                       Bus bus)
Specified by:
initialize in interface Feature

initialize

public void initialize(Client client,
                       Bus bus)
Specified by:
initialize in interface Feature

initialize

public void initialize(InterceptorProvider interceptorProvider,
                       Bus bus)
Specified by:
initialize in interface Feature

initialize

public void initialize(Bus bus)
Specified by:
initialize in interface Feature

initializeProvider

protected void initializeProvider(InterceptorProvider provider,
                                  Bus bus)

getActive

public static <T> T getActive(List<? extends Feature> features,
                              Class<T> type)
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

Apache CXF API

Apache CXF