Interface CallChain.Initiator<ClientT,​ModelT,​CallbackT extends StdCallbackContext>

  • Type Parameters:
    ClientT - the AWS Service client.
    ModelT - the model object being worked on
    CallbackT - the callback context
    All Superinterfaces:
    CallChain.RequestMaker<ClientT,​ModelT,​CallbackT>
    Enclosing interface:
    CallChain

    public static interface CallChain.Initiator<ClientT,​ModelT,​CallbackT extends StdCallbackContext>
    extends CallChain.RequestMaker<ClientT,​ModelT,​CallbackT>
    Provides an API initiator interface that works for all API calls that need conversion, retry-backoff strategy, common exception handling and more against desired state of the resource and callback context. This needs to be instantiated once with the client, model and callback context and used. It takes a reference to the desired state model, so any changes made on the model object will be reflected here. The model and callback can accessed from the instantiator instance
    • Method Detail

      • initiate

        CallChain.RequestMaker<ClientT,​ModelT,​CallbackT> initiate​(String callGraph)
        Each service call must be first initiated. Every call is provided a separate name called call graph. This is essential from both a tracing perspective as well as StdCallbackContext automated replay capabilities.
        Parameters:
        callGraph - , the name of the service operation this call graph is about.
        Returns:
        Provides the next logical set in the fluent API.
      • getResourceModel

        ModelT getResourceModel()
        Returns:
        the model associated with the API initiator. Can not be null
      • getCallbackContext

        CallbackT getCallbackContext()
        Returns:
        the callback context associated with API initiator, Can not be null
      • getLogger

        Logger getLogger()
        Returns:
        logger associated to log messages
      • rebindModel

        <NewModelT> CallChain.Initiator<ClientT,​NewModelT,​CallbackT> rebindModel​(NewModelT model)
        Can rebind a new model to the call chain while retaining the client and callback context
        Type Parameters:
        NewModelT - , this actual model type
        Parameters:
        model - , the new model for the callchain initiation
        Returns:
        new CallChain.Initiator that now has the new model associated with it
      • rebindCallback

        <NewCallbackT extends StdCallbackContextCallChain.Initiator<ClientT,​ModelT,​NewCallbackT> rebindCallback​(NewCallbackT callback)
        Can rebind a new callback context for a call chain while retaining the model and client
        Type Parameters:
        NewCallbackT - new callback context type
        Parameters:
        callback - the new callback context
        Returns:
        new CallChain.Initiator that now has the new callback associated with it