Class FileCallback

  • All Implemented Interfaces:
    kotlin.Function , kotlin.Function1

    
    public final class FileCallback
     implements Function1<HttpContext, HttpContext>
                        

    Callback that resolves requests' path parameters to files based on a base file. Requests path parameters are not allowed to contain .. (references to file parent directories are not permitted).

    If request does not have path parameters file will be returned (or not found if file is a directory).

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      HttpContext invoke(HttpContext context)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileCallback

        FileCallback(String file)
      • FileCallback

        FileCallback(File file)
        Parameters:
        file - Base file used to resolve paths passed on the request.
    • Method Detail

      • invoke

         HttpContext invoke(HttpContext context)