Class DefaultWebHandler

java.lang.Object
io.sockit.gameserver.DefaultWebHandler
All Implemented Interfaces:
WebHandler

public class DefaultWebHandler
extends Object
implements WebHandler
A Default Web Handler for web requests. This Class implements the WebHandler interface.
  • Constructor Details

    • DefaultWebHandler

      public DefaultWebHandler​(File webRoootFolder)
      Constructs a new DefaultWebHandler object with the specified folder as the web root folder
      Parameters:
      webRoootFolder - - the web root folder
    • DefaultWebHandler

      public DefaultWebHandler​(String webRoootFolder)
      Constructs a new DefaultWebHandler object with the specified folder as the web root folder
      Parameters:
      webRoootFolder - - the web root folder
  • Method Details

    • getWebResource

      public WebResource getWebResource​(SocketAddress remoteAddress, Iterable<Map.Entry<String,​String>> requestHeaders, String uri)
      Description copied from interface: WebHandler
      Returns the Web Resource for a specified web path.The web path is the path following the domain name in a web url.
      Specified by:
      getWebResource in interface WebHandler
      Parameters:
      remoteAddress - - the socket address of the http client which made the request
      requestHeaders - - the http request headers which are part of the http request
      uri - - the web path of the web request
      Returns:
      WebResource - the Web Resource for a specified web uri