javax.ws.rs.core
Interface Feature


public interface Feature

A feature extension.

Typically encapsulates concepts that involve multiple providers (e.g. filters or interceptors) and/or configuration properties.

Since:
2.0
Author:
Marek Potociar

Method Summary
 boolean configure(Configurable configurable)
          A call-back method called when the feature is to be enabled in a given configurable scope.
 

Method Detail

configure

boolean configure(Configurable configurable)
A call-back method called when the feature is to be enabled in a given configurable scope. The responsibility of the feature is to properly update the supplied configurable context and return true if the feature was successfully enabled or false otherwise.

Note that under some circumstances the feature may decide not to enable itself, which is indicated by returning false. In such case the configurable context does not internally register the feature in the collection of enabled features and the attempt to enable the feature is ignored.

Parameters:
configurable - configurable context in which the feature should be enabled.
Returns:
true if the feature was successfully enabled, false otherwise.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.