Interface VarExploder

  • All Known Implementing Classes:

    public interface VarExploder

    A VarExploder is invoked when an explode modifier "*" is encountered within a variable name within a URI expression expression and the replacement value is a complex type, such a some type of POJO or other data type. For most use cases, the DefaultVarExploder will be sufficient. Please refer to the DefaultVarExploder JavaDoc for more details on how it works.

    Should the DefaultVarExploder not be suitable for your needs, custom VarExploder implementations can be added by rolling your own implementation. A custom VarExploder implementation can be registered in one of two ways. By wrapping your object in your VarExploder:

     UriTemplate.fromTemplate("/mapper{?address*}").set("address", new MyCustomVarExploder(address)).expand();

    Note: VarExploder implementations are ONLY invoked when the explode modifier "*" is declared in the URI Template expression. If the variable declaration does not specify the explode modifier, a VariableExpansionException will be raised.

    Please see the unit test on example usage of a custom VarExploder.

    $Revision: 1.1 $
    Ryan J. McDonough