Class ChallengeResponsePresenter<T extends ChallengeResponseView>

    • Constructor Detail

      • ChallengeResponsePresenter

        public ChallengeResponsePresenter​(java.lang.String id,
                                          java.lang.String responseId)
        Create the presenter with default ChallengeParams
        Parameters:
        id - challenge id
        responseId - response id
      • ChallengeResponsePresenter

        public ChallengeResponsePresenter​(java.lang.String id,
                                          java.lang.String responseId,
                                          ChallengeParams params)
        Create the presenter with a given ChallengeParams
        Parameters:
        id - challenge id
        responseId - response id
        params - the ChallengeParams
    • Method Detail

      • submitChallengeResponse

        protected void submitChallengeResponse​(ChallengeFields challengeFields)
        Respond to a challenge
        Parameters:
        challengeFields - answers that is attached upon responding to the challenge
      • submitChallengeResponse

        protected void submitChallengeResponse​(ChallengeParts challengeParts)
        Respond to a challenge
        Parameters:
        challengeParts - answers that is attached upon responding to the challenge
      • submitChallengeResponse

        protected void submitChallengeResponse​(okhttp3.RequestBody body)
        Respond to a challenge
        Parameters:
        body - answers that is attached upon responding to the challenge
      • submitChallengeResponse

        protected void submitChallengeResponse​(ChallengeFields challengeFields,
                                               ListenerModel<BaseModel<Response>,​Response> listener)
        Respond to a challenge
        Parameters:
        challengeFields - answers that is attached upon responding to the challenge
        listener - handle challenge response
      • submitChallengeResponse

        protected void submitChallengeResponse​(ChallengeParts challengeParts,
                                               ListenerModel<BaseModel<Response>,​Response> listener)
        Respond to a challenge
        Parameters:
        challengeParts - answers that is attached upon responding to the challenge
        listener - handle challenge response
      • submitChallengeResponse

        protected void submitChallengeResponse​(okhttp3.RequestBody body,
                                               ListenerModel<BaseModel<Response>,​Response> listener)
        Respond to a challenge
        Parameters:
        body - answers that is attached upon responding to the challenge
        listener - handle challenge response
      • onRespondSuccess

        protected void onRespondSuccess​(Response data)
        Notify the view that the challenge response is successful
        Parameters:
        data - the Response
      • onRespondFailed

        protected void onRespondFailed​(java.lang.String error)
        Show challenge response error message
        Parameters:
        error - message