org.apache.logging.log4j.message

Class DefaultFlowMessageFactory

    • Constructor Detail

      • DefaultFlowMessageFactory

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

        public DefaultFlowMessageFactory(String entryText,
                                         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 String getEntryText()
        Gets the entry text.
        Returns:
        the entry text.
      • getExitText

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

        public ExitMessage newExitMessage(String format,
                                          Object result)
        Description copied from interface: FlowMessageFactory
        Creates a new exit message based on a return value and a forma string.
        Specified by:
        newExitMessage in interface FlowMessageFactory
        Parameters:
        format - a format string
        result - the return value
        Returns:
        the new exit message
      • newExitMessage

        public ExitMessage newExitMessage(Message message)
        Description copied from interface: FlowMessageFactory
        Creates a new exit message based on no return value and an existing message.
        Specified by:
        newExitMessage in interface FlowMessageFactory
        Parameters:
        message - the original entry message
        Returns:
        the new exit message
      • newExitMessage

        public ExitMessage newExitMessage(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(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

Copyright © 1999-2023 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.