All Classes and Interfaces

Class
Description
Interface for a handler in case a SimpleHandler is not flexible enough.
EnumParser<T extends Enum<T>>
A parser for enum types.
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.
This exception type can be thrown to immediately finish handling a request and respond with a specific response value.
Implementations of this interface are used to parse a higher-level type from a string.
This exception gets thrown by a FromStringParser if the string to parse does not conform to the parser's expectation.
This registry keeps FromStringParsers used to parse path parameters and querystring parameters.
HTTP methods as an enum.
This simply accepts response values that implement Response themselves and returns them unchanged.
Parses integers from their usual decimal text representation.
Converts any JSON-able value into a Response by invoking the JsonEngine, then sending the result with HTTP status code 200.
This segment only matches a request path segment with the exact same text.
A parser for LocalDate.
A parser for LocalDateTime.
A parser for LocalTime.
Parses longs from their usual decimal text representation.
This record passes the value and optionally the name of a path argument to a mock request.
A mock implementation of Request that can be used in tests.
Implements the infrastructure behind MockRequests, such as the JsonEngine to use.
Does not respond at all.
This exception type gets thrown if no response factory can be found for a specific response value.
Produces an empty 200 response when null is returned as a response value.
NOT PUBLIC API
Parses an optional field, returning an OptionalField which wraps the parsed value (or nothing if the field to parse is absent).
This interface exposes only the FromStringParserRegistry.parseFromString(String, Type) method.
A path -- actually a path pattern -- that determines whether the actual path provided by a request matches a route.
A concrete argument that was bound to a path parameter.
This exception type is thrown when a path argument cannot be parsed, wrapping a FromStringParserException.
A single segment from a Path.
NOT PUBLIC API
A QuerystringParser turns a querystring into a Java Object, typically a record since parsers for them can be auto-generated.
A registry for QuerystringParser objects.
Represents one or more errors from parsing the querystring.
This class implements an auto-generated record parser.
This interface provides access to all properties of an HTTP request that are relevant for the REST API.
Holds the run-time state of processing a single request.
This object defines how to obtain the request path from the servlet request.
An object that knows how to express itself via HTTP to the client.
This factory knows how to turn specific kinds of response values into Response objects.
Allows to register ResponseFactorys that provide Response implementations for the response values returned by handlers.
This interface is used by the Response to transmit itself to the client.
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.
This class is the main Entry point into grumpyrest.
Java servlet that serves a REST API defined by a RestApi object.
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.
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.
Interface for a handler in the most common, "simple", case.
Implements a standard JSON-based error response format, combined with a selectable HTTP status code.
Represents an error for a single field.
Sends an empty response with a configurable HTTP status code.
Returns the argument text as a String without any actual parsing.
This segment matches any request path segment.