Class AbstractSenderModule

    • Constructor Detail

      • AbstractSenderModule

        public AbstractSenderModule()
    • Method Detail

      • getRetryCount

        @Nonnegative
        protected final int getRetryCount​(@Nullable
                                          Partnership aPartnerhsip,
                                          @Nullable
                                          Map<String,​Object> aOptions)
        How many times should this message be sent?
        Parameters:
        aPartnerhsip - Partnership to be used. May be null
        aOptions - Options to choose from. May be null.
        Returns:
        0 to indicate no retry.
      • doResend

        protected final boolean doResend​(@Nonnull
                                         String sResendAction,
                                         @Nonnull
                                         IMessage aMsg,
                                         @Nullable
                                         AS2Exception aCause,
                                         int nTriesLeft)
                                  throws AS2Exception
        Parameters:
        sResendAction - Handler action name to use. May not be null.
        aMsg - The message to be resend. May be an AS2 message or an MDN.
        aCause - The error cause.
        nTriesLeft - The number of retries left.
        Returns:
        true if the message was scheduled for re-sending.
        Throws:
        AS2Exception - In case of an error