javax.ws.rs.client
Interface Feature


public interface Feature

A configurable feature.

Typically encapsulates concepts that involve multiple filters, interceptors and/or configuration properties.

Author:
Marek Potociar (marek.potociar at oracle.com)

Method Summary
 boolean onEnable(Configuration configuration)
          Called when the feature is to be enabled.
 

Method Detail

onEnable

boolean onEnable(Configuration configuration)
Called when the feature is to be enabled. The responsibility of the feature is to properly update the supplied configuration and return true if the feature was enabled or false otherwise.

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

Parameters:
configuration - configuration where 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.