Class DefaultResourceSupplier

  • All Implemented Interfaces:
    ResourceSupplier

    public class DefaultResourceSupplier
    extends java.lang.Object
    implements ResourceSupplier
    A resource supplier that just delegates directly to a resource manager
    Author:
    Stuart Douglas
    • Constructor Detail

      • DefaultResourceSupplier

        public DefaultResourceSupplier​(ResourceManager resourceManager)
    • Method Detail

      • getResource

        public Resource getResource​(HttpServerExchange exchange,
                                    java.lang.String path)
                             throws java.io.IOException
        Specified by:
        getResource in interface ResourceSupplier
        Parameters:
        exchange - The current exchange
        path - The path to resolve
        Returns:
        A resource to serve
        Throws:
        java.io.IOException - if an error ocured resolving the resource