Package io.github.sigmacasino
Class GetRoute
java.lang.Object
io.github.sigmacasino.HTTPRoute
io.github.sigmacasino.GetRoute
- All Implemented Interfaces:
spark.Route
- Direct Known Subclasses:
HTMLTemplateRoute
,Index
,Logout
,StripeResult
A route that handles GET requests.
-
Field Summary
Fields inherited from class io.github.sigmacasino.HTTPRoute
app, loginRequired, path
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Object
handle
(spark.Request request, spark.Response response) Handles a GET request by running super.handle() and then calling handleGet().abstract Object
handleGet
(spark.Request request, spark.Response response) Handles a GET request.final void
Registers the route with Spark.
-
Constructor Details
-
GetRoute
Creates a new GET route.- Parameters:
app
- app instance, passed to the super contructorpath
- the path of the route, passed to the super contructor
-
-
Method Details
-
handle
Handles a GET request by running super.handle() and then calling handleGet(). -
registerSparkRoute
public final void registerSparkRoute()Description copied from class:HTTPRoute
Registers the route with Spark.- Specified by:
registerSparkRoute
in classHTTPRoute
-
handleGet
public abstract Object handleGet(spark.Request request, spark.Response response) throws SQLException Handles a GET request.- Parameters:
request
- the requestresponse
- the response- Returns:
- the response body
- Throws:
SQLException
- if a database access error occurs in any subclass implementation
-