Index

A C D E F G H I J L M N O P Q R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form

A

addComplexRoute(HttpMethod, Path, ComplexHandler) - Method in class io.github.grumpystuff.grumpyrest.RestApi
Adds a route to handle requests.
addComplexRoute(HttpMethod, String, ComplexHandler) - Method in class io.github.grumpystuff.grumpyrest.RestApi
Adds a route to handle requests.
addCustomHeader(String, String) - Method in interface io.github.grumpystuff.grumpyrest.response.ResponseTransmitter
Header Method: Adds a custom header to send to the client.
addRoute(HttpMethod, Path, SimpleHandler) - Method in class io.github.grumpystuff.grumpyrest.RestApi
Adds a route to handle requests.
addRoute(HttpMethod, String, SimpleHandler) - Method in class io.github.grumpystuff.grumpyrest.RestApi
Adds a route to handle requests.
addRoute(Route) - Method in class io.github.grumpystuff.grumpyrest.RestApi
Adds a route to handle requests.

C

clear() - Method in class io.github.grumpystuff.grumpyrest.response.ResponseFactoryRegistry
Removes all response factories from this registry.
ComplexHandler - Interface in io.github.grumpystuff.grumpyrest
Interface for a handler in case a SimpleHandler is not flexible enough.
createResponse() - Method in exception class io.github.grumpystuff.grumpyrest.request.PathArgumentParseException
 
createResponse() - Method in interface io.github.grumpystuff.grumpyrest.response.SelfResponseFactory
Creates the response.
createResponse(RequestCycle, Object) - Method in interface io.github.grumpystuff.grumpyrest.response.ResponseFactory
Creates a Response from the specified response value.
createResponse(RequestCycle, Object) - Method in class io.github.grumpystuff.grumpyrest.response.ResponseFactoryRegistry
Converts a response value to a Response using an appropriate response factory from this registry.
createResponse(RequestCycle, Object) - Method in class io.github.grumpystuff.grumpyrest.response.standard.IdentityResponseFactory
 
createResponse(RequestCycle, Object) - Method in class io.github.grumpystuff.grumpyrest.response.standard.JsonResponseFactory
 
createResponse(RequestCycle, Object) - Method in class io.github.grumpystuff.grumpyrest.response.standard.NullResponseFactory
 

D

DELETE - Enum constant in enum class io.github.grumpystuff.grumpyrest.request.HttpMethod
HTTP DELETE method
doDelete(HttpServletRequest, HttpServletResponse) - Method in class io.github.grumpystuff.grumpyrest.servlet.RestServlet
 
doGet(HttpServletRequest, HttpServletResponse) - Method in class io.github.grumpystuff.grumpyrest.servlet.RestServlet
 
doPost(HttpServletRequest, HttpServletResponse) - Method in class io.github.grumpystuff.grumpyrest.servlet.RestServlet
 
doPut(HttpServletRequest, HttpServletResponse) - Method in class io.github.grumpystuff.grumpyrest.servlet.RestServlet
 
DUPLICATE_PARAMETER - Static variable in class io.github.grumpystuff.grumpyrest.ExceptionMessages
Error message for a duplicate parameter, such as in the request path or querystring.

E

EnumParser<T extends Enum<T>> - Class in io.github.grumpystuff.grumpyrest.request.stringparser.standard
A parser for enum types.
EnumParser(Class<T>) - Constructor for class io.github.grumpystuff.grumpyrest.request.stringparser.standard.EnumParser
Constructor
equals(Object) - Method in record class io.github.grumpystuff.grumpyrest.request.mock.MockPathArgument
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class io.github.grumpystuff.grumpyrest.request.mock.MockRequestServices
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class io.github.grumpystuff.grumpyrest.request.path.Path
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse.Field
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class io.github.grumpystuff.grumpyrest.Route
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class io.github.grumpystuff.grumpyrest.RouteMatchResult
Indicates whether some other object is "equal to" this one.
ExceptionMessages - Class in io.github.grumpystuff.grumpyrest
This class is mostly useful for unit tests: If we hardcoded the error messages at the point these errors occur, then we would have to duplicate them in the tests.

F

Field(String, String) - Constructor for record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse.Field
Constructor.
fields() - Method in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
Returns the value of the fields record component.
FinishRequestException - Exception Class in io.github.grumpystuff.grumpyrest.response
This exception type can be thrown to immediately finish handling a request and respond with a specific response value.
FinishRequestException(Object) - Constructor for exception class io.github.grumpystuff.grumpyrest.response.FinishRequestException
Constructor.
FromStringParser - Interface in io.github.grumpystuff.grumpyrest.request.stringparser
Implementations of this interface are used to parse a higher-level type from a string.
FromStringParserException - Exception Class in io.github.grumpystuff.grumpyrest.request.stringparser
This exception gets thrown by a FromStringParser if the string to parse does not conform to the parser's expectation.
FromStringParserException(String) - Constructor for exception class io.github.grumpystuff.grumpyrest.request.stringparser.FromStringParserException
Constructor
fromStringParserRegistry() - Method in record class io.github.grumpystuff.grumpyrest.request.mock.MockRequestServices
Returns the value of the fromStringParserRegistry record component.
FromStringParserRegistry - Class in io.github.grumpystuff.grumpyrest.request.stringparser
This registry keeps FromStringParsers used to parse path parameters and querystring parameters.
FromStringParserRegistry() - Constructor for class io.github.grumpystuff.grumpyrest.request.stringparser.FromStringParserRegistry
Constructor.

G

generateRegistrable(Type) - Method in class io.github.grumpystuff.grumpyrest.request.querystring.QuerystringParserRegistry
 
generateRegistrable(Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.FromStringParserRegistry
 
GET - Enum constant in enum class io.github.grumpystuff.grumpyrest.request.HttpMethod
HTTP GET method
getApi() - Method in class io.github.grumpystuff.grumpyrest.RequestCycle
Getter method for the RestApi that handles the request
getCause() - Method in exception class io.github.grumpystuff.grumpyrest.request.PathArgumentParseException
Returns the exception that caused the parsing to fail.
getErrorMessageForUnknownKey(Type) - Method in class io.github.grumpystuff.grumpyrest.request.querystring.QuerystringParserRegistry
 
getErrorMessageForUnknownKey(Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.FromStringParserRegistry
 
getFieldErrors() - Method in exception class io.github.grumpystuff.grumpyrest.request.querystring.QuerystringParsingException
Getter for the field errors
getFromStringParserRegistry() - Method in class io.github.grumpystuff.grumpyrest.RestApi
Getter method for the registry for from-string parsers.
getHeader(String) - Method in class io.github.grumpystuff.grumpyrest.request.mock.MockRequest
 
getHeader(String) - Method in interface io.github.grumpystuff.grumpyrest.request.Request
Getter method for HTTP request headers.
getHighlevelRequest() - Method in class io.github.grumpystuff.grumpyrest.RequestCycle
The high-level Request object that makes all relevant properties of the HTTP request available.
getJsonEngine() - Method in class io.github.grumpystuff.grumpyrest.RestApi
Getter method for the JsonEngine.
getMatchedRoute() - Method in class io.github.grumpystuff.grumpyrest.RequestCycle
Getter method for the route that matched this request.
getMethod() - Method in class io.github.grumpystuff.grumpyrest.request.mock.MockRequest
 
getMethod() - Method in interface io.github.grumpystuff.grumpyrest.request.Request
Getter method for the HTTP method.
getName() - Method in class io.github.grumpystuff.grumpyrest.request.PathArgument
Getter for the name of the path parameter.
getName() - Method in exception class io.github.grumpystuff.grumpyrest.request.PathArgumentParseException
Returns the name of the path argument that could not be parsed.
getOutputStream() - Method in interface io.github.grumpystuff.grumpyrest.response.ResponseTransmitter
Body method: Obtains the output stream to send body data to the client.
getPath(HttpServletRequest) - Method in enum class io.github.grumpystuff.grumpyrest.servlet.RequestPathSourcingStrategy
Determines the request path from a servlet request object.
getPathArguments() - Method in class io.github.grumpystuff.grumpyrest.request.mock.MockRequest
 
getPathArguments() - Method in interface io.github.grumpystuff.grumpyrest.request.Request
Getter method for the path arguments bound to path parameters in the matched route.
getPathArguments() - Method in class io.github.grumpystuff.grumpyrest.RequestCycle
Getter method for the path arguments that are bound to variables in the path of the matched route.
getPathSegments() - Method in class io.github.grumpystuff.grumpyrest.RequestCycle
Getter method for the requested path, split into segments at slashes
getQuerystringParserRegistry() - Method in class io.github.grumpystuff.grumpyrest.RestApi
Getter method for the registry for whole-querystring parsers.
getResponseFactoryRegistry() - Method in class io.github.grumpystuff.grumpyrest.RestApi
Getter method for the registry for custom response factories.
getResponseTransmitter() - Method in class io.github.grumpystuff.grumpyrest.RequestCycle
Returns an object that is used by Response implementations to transmit the response to the client.
getResponseValue() - Method in exception class io.github.grumpystuff.grumpyrest.response.NoResponseFactoryException
Getter for the response value
getRoutes() - Method in class io.github.grumpystuff.grumpyrest.RestApi
Returns a snapshot of the currently present routes.
getServletRequest() - Method in class io.github.grumpystuff.grumpyrest.RequestCycle
Getter method for the underlying servlet request
getText() - Method in class io.github.grumpystuff.grumpyrest.request.path.LiteralPathSegment
Getter method for the segment text
getText() - Method in class io.github.grumpystuff.grumpyrest.request.PathArgument
Getter for the textual value of the path argument
getValue() - Method in exception class io.github.grumpystuff.grumpyrest.request.PathArgumentParseException
Returns the value of the path argument that could not be parsed.
getValue(TypeToken<T>) - Method in class io.github.grumpystuff.grumpyrest.request.PathArgument
Converts the path argument to the specified type.
getValue(Class<T>) - Method in class io.github.grumpystuff.grumpyrest.request.PathArgument
Converts the path argument to the specified class type.
getValue(Type) - Method in class io.github.grumpystuff.grumpyrest.request.PathArgument
Converts the path argument to the specified type.
getVariableName() - Method in class io.github.grumpystuff.grumpyrest.request.path.VariablePathSegment
Getter for the variable name
getWrappedResponseValue() - Method in exception class io.github.grumpystuff.grumpyrest.response.FinishRequestException
 
getWrappedResponseValue() - Method in interface io.github.grumpystuff.grumpyrest.response.ResponseValueWrapper
Getter method for the response value wrapped by this wrapper.

H

handle(Request) - Method in interface io.github.grumpystuff.grumpyrest.SimpleHandler
Handles a request.
handle(RequestCycle) - Method in interface io.github.grumpystuff.grumpyrest.ComplexHandler
Handles a request.
handle(RequestCycle) - Method in class io.github.grumpystuff.grumpyrest.RestApi
Handles a request cycle.
handler() - Method in record class io.github.grumpystuff.grumpyrest.Route
Returns the value of the handler record component.
hashCode() - Method in record class io.github.grumpystuff.grumpyrest.request.mock.MockPathArgument
Returns a hash code value for this object.
hashCode() - Method in record class io.github.grumpystuff.grumpyrest.request.mock.MockRequestServices
Returns a hash code value for this object.
hashCode() - Method in record class io.github.grumpystuff.grumpyrest.request.path.Path
Returns a hash code value for this object.
hashCode() - Method in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse.Field
Returns a hash code value for this object.
hashCode() - Method in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
Returns a hash code value for this object.
hashCode() - Method in record class io.github.grumpystuff.grumpyrest.Route
Returns a hash code value for this object.
hashCode() - Method in record class io.github.grumpystuff.grumpyrest.RouteMatchResult
Returns a hash code value for this object.
HttpMethod - Enum Class in io.github.grumpystuff.grumpyrest.request
HTTP methods as an enum.

I

ID_NOT_FOUND - Static variable in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
This response indicates that the route is known in principle, but contains an ID that does not exist.
IdentityResponseFactory - Class in io.github.grumpystuff.grumpyrest.response.standard
This simply accepts response values that implement Response themselves and returns them unchanged.
IdentityResponseFactory() - Constructor for class io.github.grumpystuff.grumpyrest.response.standard.IdentityResponseFactory
Constructor.
INSTANCE - Static variable in class io.github.grumpystuff.grumpyrest.response.standard.NopResponse
A shared instance of this class that can be used to reduce memory usage.
IntegerFromStringParser - Class in io.github.grumpystuff.grumpyrest.request.stringparser.standard
Parses integers from their usual decimal text representation.
IntegerFromStringParser() - Constructor for class io.github.grumpystuff.grumpyrest.request.stringparser.standard.IntegerFromStringParser
Constructor.
INTERNAL_SERVER_ERROR - Static variable in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
The standard response for "something went wrong in the server", usually an uncaught exception.
invokeHandler(RequestCycle) - Method in record class io.github.grumpystuff.grumpyrest.Route
Calls the handler for the specified request cycle.
IO_ERROR - Static variable in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
This gets responded (if even possible) when reading the request failed with a network error.
io.github.grumpystuff.grumpyrest - package io.github.grumpystuff.grumpyrest
 
io.github.grumpystuff.grumpyrest.request - package io.github.grumpystuff.grumpyrest.request
 
io.github.grumpystuff.grumpyrest.request.mock - package io.github.grumpystuff.grumpyrest.request.mock
 
io.github.grumpystuff.grumpyrest.request.path - package io.github.grumpystuff.grumpyrest.request.path
 
io.github.grumpystuff.grumpyrest.request.querystring - package io.github.grumpystuff.grumpyrest.request.querystring
 
io.github.grumpystuff.grumpyrest.request.stringparser - package io.github.grumpystuff.grumpyrest.request.stringparser
 
io.github.grumpystuff.grumpyrest.request.stringparser.standard - package io.github.grumpystuff.grumpyrest.request.stringparser.standard
 
io.github.grumpystuff.grumpyrest.response - package io.github.grumpystuff.grumpyrest.response
 
io.github.grumpystuff.grumpyrest.response.standard - package io.github.grumpystuff.grumpyrest.response.standard
 
io.github.grumpystuff.grumpyrest.servlet - package io.github.grumpystuff.grumpyrest.servlet
 
io.github.grumpystuff.grumpyrest.util - package io.github.grumpystuff.grumpyrest.util
 

J

JSON_EXPECTED - Static variable in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
Most endpoints expect a JSON request body (if they expect a request body at all), so here is a standard response for other request content types.
jsonEngine() - Method in record class io.github.grumpystuff.grumpyrest.request.mock.MockRequestServices
Returns the value of the jsonEngine record component.
JsonResponseFactory - Class in io.github.grumpystuff.grumpyrest.response.standard
Converts any JSON-able value into a Response by invoking the JsonEngine, then sending the result with HTTP status code 200.
JsonResponseFactory() - Constructor for class io.github.grumpystuff.grumpyrest.response.standard.JsonResponseFactory
Constructor.

L

LiteralPathSegment - Class in io.github.grumpystuff.grumpyrest.request.path
This segment only matches a request path segment with the exact same text.
LiteralPathSegment(String) - Constructor for class io.github.grumpystuff.grumpyrest.request.path.LiteralPathSegment
Constructor.
LocalDateParser - Class in io.github.grumpystuff.grumpyrest.request.stringparser.standard
A parser for LocalDate.
LocalDateParser() - Constructor for class io.github.grumpystuff.grumpyrest.request.stringparser.standard.LocalDateParser
Constructor
LocalDateTimeParser - Class in io.github.grumpystuff.grumpyrest.request.stringparser.standard
A parser for LocalDateTime.
LocalDateTimeParser() - Constructor for class io.github.grumpystuff.grumpyrest.request.stringparser.standard.LocalDateTimeParser
Constructor
LocalTimeParser - Class in io.github.grumpystuff.grumpyrest.request.stringparser.standard
A parser for LocalTime.
LocalTimeParser() - Constructor for class io.github.grumpystuff.grumpyrest.request.stringparser.standard.LocalTimeParser
Constructor
LongFromStringParser - Class in io.github.grumpystuff.grumpyrest.request.stringparser.standard
Parses longs from their usual decimal text representation.
LongFromStringParser() - Constructor for class io.github.grumpystuff.grumpyrest.request.stringparser.standard.LongFromStringParser
Constructor.

M

match(RequestCycle) - Method in class io.github.grumpystuff.grumpyrest.RestApi
Matches the specified request cycle against all routes.
match(RequestCycle) - Method in record class io.github.grumpystuff.grumpyrest.Route
Tries to match the specified request cycle against this route.
match(List<String>, ParseFromStringService) - Method in record class io.github.grumpystuff.grumpyrest.request.path.Path
Matches a request path (i.e. a list of strings) against this path.
matches(String) - Method in enum class io.github.grumpystuff.grumpyrest.request.HttpMethod
Checks whether this method matches the specified other method.
matches(String) - Method in class io.github.grumpystuff.grumpyrest.request.path.LiteralPathSegment
 
matches(String) - Method in class io.github.grumpystuff.grumpyrest.request.path.PathSegment
Checks whether this segment matches a segment of a path from an incoming request.
matches(String) - Method in class io.github.grumpystuff.grumpyrest.request.path.VariablePathSegment
 
message() - Method in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse.Field
Returns the value of the message record component.
message() - Method in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
Returns the value of the message record component.
method() - Method in record class io.github.grumpystuff.grumpyrest.Route
Returns the value of the method record component.
MISSING_PARAMETER - Static variable in class io.github.grumpystuff.grumpyrest.ExceptionMessages
Error message for a missing parameter, such as in the request path or querystring.
MockPathArgument - Record Class in io.github.grumpystuff.grumpyrest.request.mock
This record passes the value and optionally the name of a path argument to a mock request.
MockPathArgument(String) - Constructor for record class io.github.grumpystuff.grumpyrest.request.mock.MockPathArgument
Value-only constructor that generates a name based on the parameter index.
MockPathArgument(String, String) - Constructor for record class io.github.grumpystuff.grumpyrest.request.mock.MockPathArgument
Standard constructor -- see class comment for details.
MockRequest - Class in io.github.grumpystuff.grumpyrest.request.mock
A mock implementation of Request that can be used in tests.
MockRequest(MockRequestServices) - Constructor for class io.github.grumpystuff.grumpyrest.request.mock.MockRequest
Constructor.
MockRequestServices - Record Class in io.github.grumpystuff.grumpyrest.request.mock
Implements the infrastructure behind MockRequests, such as the JsonEngine to use.
MockRequestServices() - Constructor for record class io.github.grumpystuff.grumpyrest.request.mock.MockRequestServices
This constructor generates new registries for everything.
MockRequestServices(FromStringParserRegistry, QuerystringParserRegistry, StructuralJsonEngine) - Constructor for record class io.github.grumpystuff.grumpyrest.request.mock.MockRequestServices
Creates an instance of a MockRequestServices record class.

N

name() - Method in record class io.github.grumpystuff.grumpyrest.request.mock.MockPathArgument
Returns the value of the name record component.
NopResponse - Class in io.github.grumpystuff.grumpyrest.response.standard
Does not respond at all.
NopResponse() - Constructor for class io.github.grumpystuff.grumpyrest.response.standard.NopResponse
Constructor.
NoResponseFactoryException - Exception Class in io.github.grumpystuff.grumpyrest.response
This exception type gets thrown if no response factory can be found for a specific response value.
NoResponseFactoryException(Object) - Constructor for exception class io.github.grumpystuff.grumpyrest.response.NoResponseFactoryException
Constructor.
NullResponseFactory - Class in io.github.grumpystuff.grumpyrest.response.standard
Produces an empty 200 response when null is returned as a response value.
NullResponseFactory() - Constructor for class io.github.grumpystuff.grumpyrest.response.standard.NullResponseFactory
Constructor.
NullReturnCheckingCalls - Class in io.github.grumpystuff.grumpyrest.util
NOT PUBLIC API

O

onSeal() - Method in class io.github.grumpystuff.grumpyrest.response.ResponseFactoryRegistry
 
OptionalFieldParser - Class in io.github.grumpystuff.grumpyrest.request.stringparser.standard
Parses an optional field, returning an OptionalField which wraps the parsed value (or nothing if the field to parse is absent).
OptionalFieldParser(FromStringParserRegistry) - Constructor for class io.github.grumpystuff.grumpyrest.request.stringparser.standard.OptionalFieldParser
Constructor.

P

parse(QuerystringParser, Map<String, String>, Type) - Static method in class io.github.grumpystuff.grumpyrest.util.NullReturnCheckingCalls
NOT PUBLIC API
parse(String) - Static method in record class io.github.grumpystuff.grumpyrest.request.path.Path
Creates an instance from a string-based specification, using :name for path parameters.
parse(String) - Static method in class io.github.grumpystuff.grumpyrest.request.path.PathSegment
Parses an instance from a single segment of a string-based path specification.
parse(Map<String, String>, Type) - Method in interface io.github.grumpystuff.grumpyrest.request.querystring.QuerystringParser
Converts the querystring to an application object.
parse(Map<String, String>, Type) - Method in class io.github.grumpystuff.grumpyrest.request.querystring.QuerystringToRecordParser
 
parseBody(TypeToken<T>) - Method in interface io.github.grumpystuff.grumpyrest.request.Request
Parses the request body using the JSON parsing mechanism defined by JsonEngine and the JSON-able types defined in the engine's JsonRegistries.
parseBody(Class<T>) - Method in interface io.github.grumpystuff.grumpyrest.request.Request
Parses the request body using the JSON parsing mechanism defined by JsonEngine and the JSON-able types defined in the engine's JsonRegistries.
parseBody(Type) - Method in class io.github.grumpystuff.grumpyrest.request.mock.MockRequest
 
parseBody(Type) - Method in interface io.github.grumpystuff.grumpyrest.request.Request
Parses the request body using the JSON parsing mechanism defined by JsonEngine and the JSON-able types defined in the engine's JsonRegistries.
parseFromAbsentString(FromStringParser, Type) - Static method in class io.github.grumpystuff.grumpyrest.util.NullReturnCheckingCalls
NOT PUBLIC API
parseFromAbsentString(Type) - Method in interface io.github.grumpystuff.grumpyrest.request.stringparser.FromStringParser
"Parses" a value from an absent string.
parseFromAbsentString(Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.OptionalFieldParser
 
parseFromString(FromStringParser, String, Type) - Static method in class io.github.grumpystuff.grumpyrest.util.NullReturnCheckingCalls
NOT PUBLIC API
parseFromString(String, Type) - Method in interface io.github.grumpystuff.grumpyrest.request.stringparser.FromStringParser
Parses a value from a string.
parseFromString(String, Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.FromStringParserRegistry
 
parseFromString(String, Type) - Method in interface io.github.grumpystuff.grumpyrest.request.stringparser.ParseFromStringService
Parses a string to obtain a value of the specified type.
parseFromString(String, Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.EnumParser
 
parseFromString(String, Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.IntegerFromStringParser
 
parseFromString(String, Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.LocalDateParser
 
parseFromString(String, Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.LocalDateTimeParser
 
parseFromString(String, Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.LocalTimeParser
 
parseFromString(String, Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.LongFromStringParser
 
parseFromString(String, Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.OptionalFieldParser
 
parseFromString(String, Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.StringFromStringParser
 
ParseFromStringService - Interface in io.github.grumpystuff.grumpyrest.request.stringparser
This interface exposes only the FromStringParserRegistry.parseFromString(String, Type) method.
parseQuerystring(TypeToken<T>) - Method in interface io.github.grumpystuff.grumpyrest.request.Request
Parses the whole querystring into an object.
parseQuerystring(Class<T>) - Method in interface io.github.grumpystuff.grumpyrest.request.Request
Parses the whole querystring into an object.
parseQuerystring(Type) - Method in class io.github.grumpystuff.grumpyrest.request.mock.MockRequest
 
parseQuerystring(Type) - Method in interface io.github.grumpystuff.grumpyrest.request.Request
Parses the whole querystring into an object.
path() - Method in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse.Field
Returns the value of the path record component.
path() - Method in record class io.github.grumpystuff.grumpyrest.Route
Returns the value of the path record component.
Path - Record Class in io.github.grumpystuff.grumpyrest.request.path
A path -- actually a path pattern -- that determines whether the actual path provided by a request matches a route.
Path(List<PathSegment>) - Constructor for record class io.github.grumpystuff.grumpyrest.request.path.Path
Compact constructor.
PATH_INFO_ONLY - Enum constant in enum class io.github.grumpystuff.grumpyrest.servlet.RequestPathSourcingStrategy
The request path only consists of the path info.
PathArgument - Class in io.github.grumpystuff.grumpyrest.request
A concrete argument that was bound to a path parameter.
PathArgument(String, String, ParseFromStringService) - Constructor for class io.github.grumpystuff.grumpyrest.request.PathArgument
NOT PUBLIC API
PathArgumentParseException - Exception Class in io.github.grumpystuff.grumpyrest.request
This exception type is thrown when a path argument cannot be parsed, wrapping a FromStringParserException.
PathArgumentParseException(String, String, FromStringParserException) - Constructor for exception class io.github.grumpystuff.grumpyrest.request.PathArgumentParseException
Constructor
pathArguments() - Method in record class io.github.grumpystuff.grumpyrest.RouteMatchResult
Returns the value of the pathArguments record component.
PathSegment - Class in io.github.grumpystuff.grumpyrest.request.path
A single segment from a Path.
PathSegment() - Constructor for class io.github.grumpystuff.grumpyrest.request.path.PathSegment
Constructor.
PathUtil - Class in io.github.grumpystuff.grumpyrest.request.path
NOT PUBLIC API
POST - Enum constant in enum class io.github.grumpystuff.grumpyrest.request.HttpMethod
HTTP POST method
PUT - Enum constant in enum class io.github.grumpystuff.grumpyrest.request.HttpMethod
HTTP PUT method

Q

QuerystringParser - Interface in io.github.grumpystuff.grumpyrest.request.querystring
A QuerystringParser turns a querystring into a Java Object, typically a record since parsers for them can be auto-generated.
querystringParserRegistry() - Method in record class io.github.grumpystuff.grumpyrest.request.mock.MockRequestServices
Returns the value of the querystringParserRegistry record component.
QuerystringParserRegistry - Class in io.github.grumpystuff.grumpyrest.request.querystring
A registry for QuerystringParser objects.
QuerystringParserRegistry(FromStringParserRegistry) - Constructor for class io.github.grumpystuff.grumpyrest.request.querystring.QuerystringParserRegistry
Constructor.
QuerystringParsingException - Exception Class in io.github.grumpystuff.grumpyrest.request.querystring
Represents one or more errors from parsing the querystring.
QuerystringParsingException(Map<String, String>) - Constructor for exception class io.github.grumpystuff.grumpyrest.request.querystring.QuerystringParsingException
Creates an instance from a set of field errors, represented as a field-name-to-error map.
QuerystringToRecordParser - Class in io.github.grumpystuff.grumpyrest.request.querystring
This class implements an auto-generated record parser.

R

register(ResponseFactory) - Method in class io.github.grumpystuff.grumpyrest.response.ResponseFactoryRegistry
Registers a response factory to this registry, to be used when converting a response value to a Response.
registerDeserializer(JsonDeserializer) - Method in class io.github.grumpystuff.grumpyrest.RestApi
Registers the specified deserializer with the JsonEngine.
registerDualConverter(T) - Method in class io.github.grumpystuff.grumpyrest.RestApi
Registers the specified dual converter with the JsonEngine.
registerFromStringParser(FromStringParser) - Method in class io.github.grumpystuff.grumpyrest.RestApi
Registers a from-string parser to support new types of path parameters and querystring parameters.
registerResponseFactory(ResponseFactory) - Method in class io.github.grumpystuff.grumpyrest.RestApi
Registers a ResponseFactory to support new kinds of response values.
registerSerializer(JsonSerializer<?>) - Method in class io.github.grumpystuff.grumpyrest.RestApi
Registers the specified serializer with the JsonEngine.
registrableSupports(QuerystringParser, Type) - Method in class io.github.grumpystuff.grumpyrest.request.querystring.QuerystringParserRegistry
 
registrableSupports(FromStringParser, Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.FromStringParserRegistry
 
Request - Interface in io.github.grumpystuff.grumpyrest.request
This interface provides access to all properties of an HTTP request that are relevant for the REST API.
requestBodyValidationFailed(JsonDeserializationException) - Static method in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
This is an error response for failed request body validation.
requestBodyValidationFailed(FieldErrorNode) - Static method in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
This is an error response for failed request body validation.
requestBodyValidationFailed(List<FieldErrorNode.FlattenedError>) - Static method in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
This is an error response for failed request body validation.
RequestCycle - Class in io.github.grumpystuff.grumpyrest
Holds the run-time state of processing a single request.
RequestCycle(RestApi, HttpServletRequest, HttpServletResponse, RequestPathSourcingStrategy) - Constructor for class io.github.grumpystuff.grumpyrest.RequestCycle
NOT PUBLIC API
RequestPathSourcingStrategy - Enum Class in io.github.grumpystuff.grumpyrest.servlet
This object defines how to obtain the request path from the servlet request.
Response - Interface in io.github.grumpystuff.grumpyrest.response
An object that knows how to express itself via HTTP to the client.
ResponseFactory - Interface in io.github.grumpystuff.grumpyrest.response
This factory knows how to turn specific kinds of response values into Response objects.
ResponseFactoryRegistry - Class in io.github.grumpystuff.grumpyrest.response
Allows to register ResponseFactorys that provide Response implementations for the response values returned by handlers.
ResponseFactoryRegistry() - Constructor for class io.github.grumpystuff.grumpyrest.response.ResponseFactoryRegistry
Constructor.
ResponseTransmitter - Interface in io.github.grumpystuff.grumpyrest.response
This interface is used by the Response to transmit itself to the client.
ResponseValueWrapper - Interface in io.github.grumpystuff.grumpyrest.response
If a handler returns an object implementing this interface, then it will be unwrapped (possibly multiple times if the wrapped value implements this interface again) before an appropriate Response is created for it.
RestApi - Class in io.github.grumpystuff.grumpyrest
This class is the main Entry point into grumpyrest.
RestApi(JsonEngine) - Constructor for class io.github.grumpystuff.grumpyrest.RestApi
Constructor.
RestServlet - Class in io.github.grumpystuff.grumpyrest.servlet
Java servlet that serves a REST API defined by a RestApi object.
RestServlet(RestApi, RequestPathSourcingStrategy) - Constructor for class io.github.grumpystuff.grumpyrest.servlet.RestServlet
Constructor.
route() - Method in record class io.github.grumpystuff.grumpyrest.RouteMatchResult
Returns the value of the route record component.
Route - Record Class in io.github.grumpystuff.grumpyrest
A route is, conceptually, a set of criteria that determine whether the route matches a specific requests, as well as a handler that defines what to do for requests that match.
Route(HttpMethod, Path, ComplexHandler) - Constructor for record class io.github.grumpystuff.grumpyrest.Route
Standard constructor.
Route(HttpMethod, Path, SimpleHandler) - Constructor for record class io.github.grumpystuff.grumpyrest.Route
Constructor for a SimpleHandler.
Route(HttpMethod, String, ComplexHandler) - Constructor for record class io.github.grumpystuff.grumpyrest.Route
This constructor specifies the path pattern as a string instead of a Path object.
Route(HttpMethod, String, SimpleHandler) - Constructor for record class io.github.grumpystuff.grumpyrest.Route
Constructor for a SimpleHandler which also specifies the path pattern as a string instead of a Path object.
RouteMatchResult - Record Class in io.github.grumpystuff.grumpyrest
RouteMatchResult(Route, List<PathArgument>) - Constructor for record class io.github.grumpystuff.grumpyrest.RouteMatchResult
Compact constructor.

S

seal() - Method in class io.github.grumpystuff.grumpyrest.RestApi
Seals this API, also sealing all registries used in it.
segments() - Method in record class io.github.grumpystuff.grumpyrest.request.path.Path
Returns the value of the segments record component.
SelfResponseFactory - Interface in io.github.grumpystuff.grumpyrest.response
Implementations of this interface can be returned as a response without using a specialized factory, but instead of implementing the Response interface manually, they just produce another Response instance.
setBody(JsonElement) - Method in class io.github.grumpystuff.grumpyrest.request.mock.MockRequest
Sets the request body.
setContentType(String) - Method in interface io.github.grumpystuff.grumpyrest.response.ResponseTransmitter
Header Method: Sets the Content-Type header to send to the client.
setHeaders(Map<String, String>) - Method in class io.github.grumpystuff.grumpyrest.request.mock.MockRequest
Sets HTTP headers.
setMethod(String) - Method in class io.github.grumpystuff.grumpyrest.request.mock.MockRequest
Sets the HTTP method.
setPathArguments(List<MockPathArgument>) - Method in class io.github.grumpystuff.grumpyrest.request.mock.MockRequest
Sets path arguments.
setQuerystring(Map<String, String>) - Method in class io.github.grumpystuff.grumpyrest.request.mock.MockRequest
Sets the querystring.
setStatus(int) - Method in interface io.github.grumpystuff.grumpyrest.response.ResponseTransmitter
Header Method: Sets the HTTP status code to send to the client.
SimpleHandler - Interface in io.github.grumpystuff.grumpyrest
Interface for a handler in the most common, "simple", case.
splitIntoSegments(String) - Static method in class io.github.grumpystuff.grumpyrest.request.path.PathUtil
NOT PUBLIC API
StandardErrorResponse - Record Class in io.github.grumpystuff.grumpyrest.response.standard
Implements a standard JSON-based error response format, combined with a selectable HTTP status code.
StandardErrorResponse(int, String) - Constructor for record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
Constructor without field errors.
StandardErrorResponse(int, String, StandardErrorResponse.Field) - Constructor for record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
Constructor with a single field error.
StandardErrorResponse(int, String, List<StandardErrorResponse.Field>) - Constructor for record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
Compact constructor.
StandardErrorResponse.Field - Record Class in io.github.grumpystuff.grumpyrest.response.standard
Represents an error for a single field.
STARTING_WITH_CONTEXT_PATH - Enum constant in enum class io.github.grumpystuff.grumpyrest.servlet.RequestPathSourcingStrategy
The request path is built by concatenating the context path, servlet path and path info.
STARTING_WITH_SERVLET_PATH - Enum constant in enum class io.github.grumpystuff.grumpyrest.servlet.RequestPathSourcingStrategy
The request path is built by concatenating the servlet path and path info.
status() - Method in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
Returns the value of the status record component.
StatusOnlyResponse - Class in io.github.grumpystuff.grumpyrest.response.standard
Sends an empty response with a configurable HTTP status code.
StatusOnlyResponse(int) - Constructor for class io.github.grumpystuff.grumpyrest.response.standard.StatusOnlyResponse
Constructor.
StringFromStringParser - Class in io.github.grumpystuff.grumpyrest.request.stringparser.standard
Returns the argument text as a String without any actual parsing.
StringFromStringParser() - Constructor for class io.github.grumpystuff.grumpyrest.request.stringparser.standard.StringFromStringParser
Constructor.
supportsType(Type) - Method in interface io.github.grumpystuff.grumpyrest.request.querystring.QuerystringParser
Checks if this parser supports the specified type.
supportsType(Type) - Method in class io.github.grumpystuff.grumpyrest.request.querystring.QuerystringToRecordParser
 
supportsType(Type) - Method in interface io.github.grumpystuff.grumpyrest.request.stringparser.FromStringParser
Checks if this parser supports the specified type.
supportsType(Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.EnumParser
 
supportsType(Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.IntegerFromStringParser
 
supportsType(Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.LocalDateParser
 
supportsType(Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.LocalDateTimeParser
 
supportsType(Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.LocalTimeParser
 
supportsType(Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.LongFromStringParser
 
supportsType(Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.OptionalFieldParser
 
supportsType(Type) - Method in class io.github.grumpystuff.grumpyrest.request.stringparser.standard.StringFromStringParser
 

T

toString() - Method in record class io.github.grumpystuff.grumpyrest.request.mock.MockPathArgument
Returns a string representation of this record class.
toString() - Method in record class io.github.grumpystuff.grumpyrest.request.mock.MockRequestServices
Returns a string representation of this record class.
toString() - Method in class io.github.grumpystuff.grumpyrest.request.path.LiteralPathSegment
 
toString() - Method in record class io.github.grumpystuff.grumpyrest.request.path.Path
Returns a string representation of this record class.
toString() - Method in class io.github.grumpystuff.grumpyrest.request.path.VariablePathSegment
 
toString() - Method in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse.Field
Returns a string representation of this record class.
toString() - Method in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
Returns a string representation of this record class.
toString() - Method in record class io.github.grumpystuff.grumpyrest.Route
Returns a string representation of this record class.
toString() - Method in record class io.github.grumpystuff.grumpyrest.RouteMatchResult
Returns a string representation of this record class.
transmit(ResponseTransmitter) - Method in interface io.github.grumpystuff.grumpyrest.response.Response
Transmits this response using the specified response transmitter.
transmit(ResponseTransmitter) - Method in interface io.github.grumpystuff.grumpyrest.response.SelfResponseFactory
 
transmit(ResponseTransmitter) - Method in class io.github.grumpystuff.grumpyrest.response.standard.NopResponse
 
transmit(ResponseTransmitter) - Method in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
 
transmit(ResponseTransmitter) - Method in class io.github.grumpystuff.grumpyrest.response.standard.StatusOnlyResponse
 
trimSlashes(String) - Static method in class io.github.grumpystuff.grumpyrest.request.path.PathUtil
NOT PUBLIC API

U

UNEXPECTED_PARAMETER - Static variable in class io.github.grumpystuff.grumpyrest.ExceptionMessages
Error message for an unexpected parameter, such as in the request path or querystring.
UNKNOWN_URL - Static variable in record class io.github.grumpystuff.grumpyrest.response.standard.StandardErrorResponse
This response indicates that no route is known for the requested URL.

V

value() - Method in record class io.github.grumpystuff.grumpyrest.request.mock.MockPathArgument
Returns the value of the value record component.
valueOf(String) - Static method in enum class io.github.grumpystuff.grumpyrest.request.HttpMethod
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class io.github.grumpystuff.grumpyrest.servlet.RequestPathSourcingStrategy
Returns the enum constant of this class with the specified name.
values() - Static method in enum class io.github.grumpystuff.grumpyrest.request.HttpMethod
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class io.github.grumpystuff.grumpyrest.servlet.RequestPathSourcingStrategy
Returns an array containing the constants of this enum class, in the order they are declared.
VariablePathSegment - Class in io.github.grumpystuff.grumpyrest.request.path
This segment matches any request path segment.
VariablePathSegment(String) - Constructor for class io.github.grumpystuff.grumpyrest.request.path.VariablePathSegment
Constructor.

W

writeJson(Object) - Method in interface io.github.grumpystuff.grumpyrest.response.ResponseTransmitter
Body method: Converts the specified value to JSON and sends it to the client using the body output stream.
A C D E F G H I J L M N O P Q R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form