Interface MessageSupplier

  • All Superinterfaces:
    java.util.function.Supplier<Message>, Supplier<Message>
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface MessageSupplier
    extends Supplier<Message>
    Classes implementing this interface know how to supply Messages.

    This is a functional interface intended to support lambda expressions in log4j 2.

    Implementors are free to cache values or return a new or distinct value each time the supplier is invoked.

    DEPRECATED: this class should not normally be used outside a Java 8+ lambda syntax. Instead, Supplier should be used as an anonymous class. Both this and Supplier will be removed in 3.0.

    Since:
    2.4
    • Method Detail

      • get

        Message get()
        Gets a Message.
        Specified by:
        get in interface java.util.function.Supplier<Message>
        Specified by:
        get in interface Supplier<Message>
        Returns:
        a Message