Enum YamlDeserializationMode

    • Enum Constant Detail

      • CLASSIC

        public static final YamlDeserializationMode CLASSIC
        This option configure the deserialization engine to strictly respect the model definition.

        As example, a Split step is expected to have it's own steps to process the result of the split.
         
         - from:
             uri: "direct:a"
             steps:
               - split:
                    tokenize: \n"
                  steps:
                    - log: "${body}"
         
         
      • FLOW

        public static final YamlDeserializationMode FLOW
        Mimics the Java Dsl.

        When the deserializer is configured to use this mode, a route can be defined using a syntax that is closed to the Java DSL, as example, the following Java route:
         
         from("direct:a")
             .split().tokenize("\n"))
             .log("${body}");
         
         
        Can be represented by the following YAML:
         
         - from:
             uri: "direct:a"
             steps:
               - split:
                    tokenize: \n"
               - log: "${body}"
         
         
        As you may have noticed, there's no need to define the split's specific steps as the subsequent log processor is automatically added to the step's outputs.

        See https://issues.apache.org/jira/browse/CAMEL-16504
    • Method Detail

      • values

        public static YamlDeserializationMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (YamlDeserializationMode c : YamlDeserializationMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static YamlDeserializationMode valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null