| Package | Description |
|---|---|
| io.javalin | |
| io.javalin.apibuilder | |
| io.javalin.core | |
| io.javalin.core.plugin |
| Modifier and Type | Method and Description |
|---|---|
Javalin |
Javalin.addHandler(io.javalin.http.HandlerType httpMethod,
String path,
Handler handler)
Adds a request handler for the specified handlerType and path to the instance.
|
Javalin |
Javalin.addHandler(io.javalin.http.HandlerType handlerType,
String path,
Handler handler,
RouteRole... roles)
Adds a request handler for the specified handlerType and path to the instance.
|
Javalin |
Javalin.after(Handler handler)
Adds an AFTER request handler for all routes in the instance.
|
Javalin |
Javalin.after(String path,
Handler handler)
Adds an AFTER request handler for the specified path to the instance.
|
Javalin |
Javalin.attribute(String key,
Object value)
Registers an attribute on the instance.
|
Javalin |
Javalin.before(Handler handler)
Adds a BEFORE request handler for all routes in the instance.
|
Javalin |
Javalin.before(String path,
Handler handler)
Adds a BEFORE request handler for the specified path to the instance.
|
static Javalin |
Javalin.create()
Creates a new instance without any custom configuration.
|
static Javalin |
Javalin.create(Consumer<JavalinConfig> config)
Creates a new instance with the user provided configuration.
|
static Javalin |
Javalin.createStandalone() |
static Javalin |
Javalin.createStandalone(Consumer<JavalinConfig> config) |
Javalin |
Javalin.delete(String path,
Handler handler)
Adds a DELETE request handler for the specified path to the instance.
|
Javalin |
Javalin.delete(String path,
Handler handler,
RouteRole... roles)
Adds a DELETE request handler with the given roles for the specified path to the instance.
|
Javalin |
Javalin.error(int statusCode,
Handler handler)
Adds an error mapper to the instance.
|
Javalin |
Javalin.error(int statusCode,
String contentType,
Handler handler)
Adds an error mapper for the specified content-type to the instance.
|
Javalin |
Javalin.events(Consumer<EventListener> listener) |
<T extends Exception> |
Javalin.exception(Class<T> exceptionClass,
ExceptionHandler<? super T> exceptionHandler)
Adds an exception mapper to the instance.
|
Javalin |
Javalin.get(String path,
Handler handler)
Adds a GET request handler for the specified path to the instance.
|
Javalin |
Javalin.get(String path,
Handler handler,
RouteRole... roles)
Adds a GET request handler with the given roles for the specified path to the instance.
|
Javalin |
Javalin.head(String path,
Handler handler)
Adds a HEAD request handler for the specified path to the instance.
|
Javalin |
Javalin.head(String path,
Handler handler,
RouteRole... roles)
Adds a HEAD request handler with the given roles for the specified path to the instance.
|
Javalin |
Javalin.options(String path,
Handler handler)
Adds a OPTIONS request handler for the specified path to the instance.
|
Javalin |
Javalin.options(String path,
Handler handler,
RouteRole... roles)
Adds a OPTIONS request handler with the given roles for the specified path to the instance.
|
Javalin |
Javalin.patch(String path,
Handler handler)
Adds a PATCH request handler for the specified path to the instance.
|
Javalin |
Javalin.patch(String path,
Handler handler,
RouteRole... roles)
Adds a PATCH request handler with the given roles for the specified path to the instance.
|
Javalin |
Javalin.post(String path,
Handler handler)
Adds a POST request handler for the specified path to the instance.
|
Javalin |
Javalin.post(String path,
Handler handler,
RouteRole... roles)
Adds a POST request handler with the given roles for the specified path to the instance.
|
Javalin |
Javalin.put(String path,
Handler handler)
Adds a PUT request handler for the specified path to the instance.
|
Javalin |
Javalin.put(String path,
Handler handler,
RouteRole... roles)
Adds a PUT request handler with the given roles for the specified path to the instance.
|
Javalin |
Javalin.routes(EndpointGroup endpointGroup)
Creates a temporary static instance in the scope of the endpointGroup.
|
Javalin |
Javalin.sse(String path,
Consumer<io.javalin.http.sse.SseClient> client)
Adds a lambda handler for a Server Sent Event connection on the specified path.
|
Javalin |
Javalin.sse(String path,
Consumer<io.javalin.http.sse.SseClient> client,
RouteRole... roles)
Adds a lambda handler for a Server Sent Event connection on the specified path.
|
Javalin |
Javalin.start()
Synchronously starts the application instance on the configured port, or on
the configured ServerConnectors if the Jetty server has been manually configured.
|
Javalin |
Javalin.start(int port)
Synchronously starts the application instance on the specified port.
|
Javalin |
Javalin.start(String host,
int port)
Synchronously starts the application instance on the specified port
with the given host IP to bind to.
|
Javalin |
Javalin.stop()
Synchronously stops the application instance.
|
Javalin |
Javalin.ws(String path,
Consumer<WsConfig> ws)
Adds a WebSocket handler on the specified path.
|
Javalin |
Javalin.ws(String path,
Consumer<WsConfig> ws,
RouteRole... roles)
Adds a WebSocket handler on the specified path with the specified roles.
|
Javalin |
Javalin.wsAfter(Consumer<WsConfig> wsConfig)
Adds a WebSocket after handler for all routes in the instance.
|
Javalin |
Javalin.wsAfter(String path,
Consumer<WsConfig> wsConfig)
Adds a WebSocket after handler for the specified path to the instance.
|
Javalin |
Javalin.wsBefore(Consumer<WsConfig> wsConfig)
Adds a WebSocket before handler for all routes in the instance.
|
Javalin |
Javalin.wsBefore(String path,
Consumer<WsConfig> wsConfig)
Adds a WebSocket before handler for the specified path to the instance.
|
<T extends Exception> |
Javalin.wsException(Class<T> exceptionClass,
WsExceptionHandler<? super T> exceptionHandler)
Adds a WebSocket exception mapper to the instance.
|
| Modifier and Type | Method and Description |
|---|---|
static Javalin |
ApiBuilder.staticInstance() |
Javalin |
ApiBuilder.wsAfter(Consumer<WsConfig> wsConfig)
Adds a WebSocket after handler for the current path to the
Javalin instance. |
Javalin |
ApiBuilder.wsAfter(String path,
Consumer<WsConfig> wsConfig)
Adds a WebSocket after handler for the specified path to the
Javalin instance. |
Javalin |
ApiBuilder.wsBefore(Consumer<WsConfig> wsConfig)
Adds a WebSocket before handler for the current path to the
Javalin instance. |
Javalin |
ApiBuilder.wsBefore(String path,
Consumer<WsConfig> wsConfig)
Adds a WebSocket before handler for the specified path to the
Javalin instance. |
| Modifier and Type | Method and Description |
|---|---|
static void |
ApiBuilder.setStaticJavalin(Javalin javalin) |
| Modifier and Type | Method and Description |
|---|---|
static void |
JavalinConfig.applyUserConfig(Javalin app,
JavalinConfig config,
Consumer<JavalinConfig> userConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
Plugin.apply(Javalin app) |
Copyright © 2022. All rights reserved.