Package net.targetr.rc
Class RootResponder
java.lang.Object
net.targetr.rc.RootResponder
- All Implemented Interfaces:
HttpInterception,ResponseGenerator
Responds to HTTP requests base on URI.
- Author:
- Dr Michael Gardiner
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs the RootResponder, initializing supplementary handlers. -
Method Summary
Modifier and TypeMethodDescriptiongenerate(HttpRequest httpReq) Dispatches the incoming HTTP request and returns an appropriate response.static StringgetAppIndexPage(String app) Returns the location of an apps index page.Used by HTTPHandler to get an HttpInterceptor to handle callbacks during HTTP communications.static booleanisValidApp(String app) Verifies whether the specified app is recognized.
-
Field Details
-
VERSION
Current version string for RCWeb.- See Also:
-
-
Constructor Details
-
RootResponder
public RootResponder()Constructs the RootResponder, initializing supplementary handlers.
-
-
Method Details
-
generate
Dispatches the incoming HTTP request and returns an appropriate response. Performs top-level routing based primarily on path semantics.- Specified by:
generatein interfaceResponseGenerator- Parameters:
httpReq- the incoming request- Returns:
- the generated web response
- Throws:
Exception- if response processing encounters an error
-
isValidApp
Verifies whether the specified app is recognized.- Parameters:
app- the app name to test- Returns:
- true if the app index.html file exists
-
getAppIndexPage
Returns the location of an apps index page.- Parameters:
app- the app name to search for- Returns:
- location of index page
-
getInterceptor
Description copied from interface:HttpInterceptionUsed by HTTPHandler to get an HttpInterceptor to handle callbacks during HTTP communications.- Specified by:
getInterceptorin interfaceHttpInterception- Returns:
- for intercepting communications
-