Jeremy Daggett created JCLOUDS-728:
--------------------------------------

             Summary: Support nested API @Delegate annotations
                 Key: JCLOUDS-728
                 URL: https://issues.apache.org/jira/browse/JCLOUDS-728
             Project: jclouds
          Issue Type: Improvement
          Components: jclouds-core
    Affects Versions: 1.8.0
            Reporter: Jeremy Daggett
            Priority: Critical


Currently, the {{@Delegate}} annotation can only delegate to a single API and 
there is a need to support multiple levels of delegation.

For example, a {{TopLevelApi}} needs to delegate to a {{FeatureApi}}, that in 
turn delegates to a {{SubFeatureApi}}:

{code:java}
public interface TopLevelApi {
    @Delegate
    FeatureApi getFeatureApi();
}

public interface FeatureApi {
    @Delegate 
    SubFeatureApi getSubFeatureApi();
}

public interface SubFeatureApi {
    // subfeature specific APIs
    String doSomething();
}
{code}

{{HttpApiModule}} uses {{BinderUtils.bindHttpApi}} to bind a top level API 
which can only delegate one level deep at this time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to