Interface MethodHandler


public interface MethodHandler
Represents HTTP method handler.

IT Hit WebDAV Server Engine allows creating custom HTTP handlers and replacing original engine handlers. To add or replace handler call Engine.registerMethodHandler(java.lang.String, com.ithit.webdav.server.MethodHandler) method passing HTTP method name and object instance implementing MethodHandler interface prior to calling Engine.service(com.ithit.webdav.server.DavRequest, com.ithit.webdav.server.DavResponse). Original handler, if any, is returned from Engine.registerMethodHandler(java.lang.String, com.ithit.webdav.server.MethodHandler) method.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determines whether response content length shall be calculated by entine.
    boolean
    Determines whether request body shall be logged.
    boolean
    Determines whether response body shall be logged.
    void
    Enables processing of HTTP Web requests by a custom handler.
  • Method Details

    • processRequest

      void processRequest(DavRequest request, DavResponse response, HierarchyItem item) throws DavException, IOException
      Enables processing of HTTP Web requests by a custom handler.
      Parameters:
      request - DavRequest implementation.
      response - DavResponse implementation.
      item - Hierarchy item returned from Engine.getHierarchyItem(java.lang.String) or null.
      Throws:
      DavException - In case of an error.
      IOException - In case of I/O error.
    • getLogInput

      boolean getLogInput()
      Determines whether request body shall be logged.
      Returns:
      True if request body shall be logged.
    • getLogOutput

      boolean getLogOutput()
      Determines whether response body shall be logged.
      Returns:
      True if response body shall be logged.
    • getCalculateContentLength

      boolean getCalculateContentLength()
      Determines whether response content length shall be calculated by entine.
      Returns:
      True if content length shall be calculated by engine.