Interface ContentLoader

  • All Known Implementing Classes:
    LiteralContentLoader, ResourceContentLoader
    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 ContentLoader
    Defines how content is to be loaded from a String input. The desired ContentLoader is created through reflection so it must always have a paramterless constructor available.
    Since:
    1.0.0
    • Method Detail

      • loadContent

        String loadContent​(String value)
                    throws IOException
        Parameters:
        value - The literal string that represents a resource that should be loaded.
        Returns:
        The content to load from a given string intended to be added to MockResponse.setBody(String).
        Throws:
        IOException - If an exception occurs while loading the content.