Class DefaultFlowMessageFactory

  • All Implemented Interfaces:
    java.io.Serializable, FlowMessageFactory

    public class DefaultFlowMessageFactory
    extends java.lang.Object
    implements FlowMessageFactory, java.io.Serializable
    Default factory for flow messages.
    Since:
    2.6
    See Also:
    Serialized Form
    • Field Detail

      • EXIT_DEFAULT_PREFIX

        private static final java.lang.String EXIT_DEFAULT_PREFIX
        See Also:
        Constant Field Values
      • ENTRY_DEFAULT_PREFIX

        private static final java.lang.String ENTRY_DEFAULT_PREFIX
        See Also:
        Constant Field Values
      • entryText

        private final java.lang.String entryText
      • exitText

        private final java.lang.String exitText
    • Constructor Detail

      • DefaultFlowMessageFactory

        public DefaultFlowMessageFactory()
        Constructs a message factory with "Enter" and "Exit" as the default flow strings.
      • DefaultFlowMessageFactory

        public DefaultFlowMessageFactory​(java.lang.String entryText,
                                         java.lang.String exitText)
        Constructs a message factory with the given entry and exit strings.
        Parameters:
        entryText - the text to use for trace entry, like "Enter".
        exitText - the text to use for trace exit, like "Exit".
    • Method Detail

      • getEntryText

        public java.lang.String getEntryText()
        Gets the entry text.
        Returns:
        the entry text.
      • getExitText

        public java.lang.String getExitText()
        Gets the exit text.
        Returns:
        the exit text.
      • newExitMessage

        public ExitMessage newExitMessage​(java.lang.Object result,
                                          EntryMessage message)
        Description copied from interface: FlowMessageFactory
        Creates a new exit message based on a return value and an existing entry message.
        Specified by:
        newExitMessage in interface FlowMessageFactory
        Parameters:
        result - the return value.
        message - the original entry message
        Returns:
        the new exit message
      • newExitMessage

        public ExitMessage newExitMessage​(java.lang.Object result,
                                          Message message)
        Description copied from interface: FlowMessageFactory
        Creates a new exit message based on a return value and an existing message.
        Specified by:
        newExitMessage in interface FlowMessageFactory
        Parameters:
        result - the return value.
        message - the original message
        Returns:
        the new exit message