Class ReconnectRuleConfigImpl

    • Field Detail

      • EXCEPTION_CLASS_PARAM_NAME

        public static final java.lang.String EXCEPTION_CLASS_PARAM_NAME
        Exception class parameter.
        See Also:
        Constant Field Values
      • REGULAR_EXPRESSION_PARAM_NAME

        public static final java.lang.String REGULAR_EXPRESSION_PARAM_NAME
        Regular expression for exception messages parameter.
        See Also:
        Constant Field Values
      • ACTION_PARAM_NAME

        public static final java.lang.String ACTION_PARAM_NAME
        Reconnect action parameter.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ReconnectRuleConfigImpl

        public ReconnectRuleConfigImpl()
        Create an empty reconnect rule configuration.
      • ReconnectRuleConfigImpl

        public ReconnectRuleConfigImpl​(java.lang.Object config)
        Create a reconnect rule configuration from the specified raw configuration.
        Parameters:
        config - Raw configuration.
    • Method Detail

      • getAction

        public java.lang.String getAction()
        Specified by:
        getAction in interface ReconnectRuleConfig
        Returns:
        What action should be taken if an error occurs and that error matches the rule. Will either be null, empty string or one of 'reconnect' or 'error'. If null or empty, the engine that interprets the rule should use its default action.
      • getExceptionClass

        public java.lang.String getExceptionClass()
        Specified by:
        getExceptionClass in interface ReconnectRuleConfig
        Returns:
        The Java class of exceptions to which this rule applies. If null or empty, the rule applies to all classes of exceptions.
      • getExceptionMessageRegExp

        public java.lang.String getExceptionMessageRegExp()
        Specified by:
        getExceptionMessageRegExp in interface ReconnectRuleConfig
        Returns:
        A regular expression that matches the messages of exceptions to which this rule applies. If null or empty, the rule applies to all exception messages.
      • validate

        public void validate()
                      throws java.lang.Exception
        Validate the contents of this reconnect rule.
        Specified by:
        validate in interface ReconnectRuleConfig
        Throws:
        java.lang.Exception - If the reconnect action is neither null, an empty string, 'error' nor 'reconnect'. If the class definition of the exception class is not available to the JVM.