Package io.sockit.gameserver
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 Summary
Constructors Constructor Description DefaultWebHandler(File webRoootFolder)
Constructs a new DefaultWebHandler object with the specified folder as the web root folderDefaultWebHandler(String webRoootFolder)
Constructs a new DefaultWebHandler object with the specified folder as the web root folder -
Method Summary
Modifier and Type Method Description WebResource
getWebResource(SocketAddress remoteAddress, Iterable<Map.Entry<String,String>> requestHeaders, String uri)
Returns the Web Resource for a specified web path.The web path is the path following the domain name in a web url.
-
Constructor Details
-
DefaultWebHandler
Constructs a new DefaultWebHandler object with the specified folder as the web root folder- Parameters:
webRoootFolder
- - the web root folder
-
DefaultWebHandler
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 interfaceWebHandler
- Parameters:
remoteAddress
- - the socket address of the http client which made the requestrequestHeaders
- - the http request headers which are part of the http requesturi
- - the web path of the web request- Returns:
- WebResource - the Web Resource for a specified web uri
-