| Package | Description |
|---|---|
| io.javalin | |
| io.javalin.apibuilder | |
| io.javalin.core | |
| io.javalin.core.plugin |
| Modifier and Type | Method and Description |
|---|---|
Javalin |
Javalin.addHandler(HandlerType httpMethod,
java.lang.String path,
Handler handler)
Adds a request handler for the specified handlerType and path to the instance.
|
Javalin |
Javalin.addHandler(HandlerType handlerType,
java.lang.String path,
Handler handler,
java.util.Set<Role> 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(java.lang.String path,
Handler handler)
Adds an AFTER request handler for the specified path to the instance.
|
Javalin |
Javalin.attribute(java.lang.Class clazz,
java.lang.Object obj)
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(java.lang.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(java.util.function.Consumer<JavalinConfig> config)
Creates a new instance with the user provided configuration.
|
static Javalin |
Javalin.createStandalone() |
static Javalin |
Javalin.createStandalone(java.util.function.Consumer<JavalinConfig> config) |
Javalin |
Javalin.delete(java.lang.String path,
Handler handler)
Adds a DELETE request handler for the specified path to the instance.
|
Javalin |
Javalin.delete(java.lang.String path,
Handler handler,
java.util.Set<Role> permittedRoles)
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,
java.lang.String contentType,
Handler handler)
Adds an error mapper for the specified content-type to the instance.
|
Javalin |
Javalin.events(java.util.function.Consumer<EventListener> listener) |
<T extends java.lang.Exception> |
Javalin.exception(java.lang.Class<T> exceptionClass,
ExceptionHandler<? super T> exceptionHandler)
Adds an exception mapper to the instance.
|
Javalin |
Javalin.get(java.lang.String path,
Handler handler)
Adds a GET request handler for the specified path to the instance.
|
Javalin |
Javalin.get(java.lang.String path,
Handler handler,
java.util.Set<Role> permittedRoles)
Adds a GET request handler with the given roles for the specified path to the instance.
|
Javalin |
Javalin.head(java.lang.String path,
Handler handler)
Adds a HEAD request handler for the specified path to the instance.
|
Javalin |
Javalin.head(java.lang.String path,
Handler handler,
java.util.Set<Role> permittedRoles)
Adds a HEAD request handler with the given roles for the specified path to the instance.
|
Javalin |
Javalin.options(java.lang.String path,
Handler handler)
Adds a OPTIONS request handler for the specified path to the instance.
|
Javalin |
Javalin.options(java.lang.String path,
Handler handler,
java.util.Set<Role> permittedRoles)
Adds a OPTIONS request handler with the given roles for the specified path to the instance.
|
Javalin |
Javalin.patch(java.lang.String path,
Handler handler)
Adds a PATCH request handler for the specified path to the instance.
|
Javalin |
Javalin.patch(java.lang.String path,
Handler handler,
java.util.Set<Role> permittedRoles)
Adds a PATCH request handler with the given roles for the specified path to the instance.
|
Javalin |
Javalin.post(java.lang.String path,
Handler handler)
Adds a POST request handler for the specified path to the instance.
|
Javalin |
Javalin.post(java.lang.String path,
Handler handler,
java.util.Set<Role> permittedRoles)
Adds a POST request handler with the given roles for the specified path to the instance.
|
Javalin |
Javalin.put(java.lang.String path,
Handler handler)
Adds a PUT request handler for the specified path to the instance.
|
Javalin |
Javalin.put(java.lang.String path,
Handler handler,
java.util.Set<Role> permittedRoles)
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(java.lang.String path,
java.util.function.Consumer<SseClient> client)
Adds a lambda handler for a Server Sent Event connection on the specified path.
|
Javalin |
Javalin.sse(java.lang.String path,
java.util.function.Consumer<SseClient> client,
java.util.Set<Role> permittedRoles)
Adds a lambda handler for a Server Sent Event connection on the specified path.
|
Javalin |
Javalin.start()
Synchronously starts the application instance on the default port (7000).
|
Javalin |
Javalin.start(int port)
Synchronously starts the application instance on the specified port.
|
Javalin |
Javalin.start(java.lang.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(java.lang.String path,
java.util.function.Consumer<WsHandler> ws)
Adds a WebSocket handler on the specified path.
|
Javalin |
Javalin.ws(java.lang.String path,
java.util.function.Consumer<WsHandler> ws,
java.util.Set<Role> permittedRoles)
Adds a WebSocket handler on the specified path with the specified roles.
|
Javalin |
Javalin.wsAfter(java.util.function.Consumer<WsHandler> wsHandler)
Adds a WebSocket after handler for all routes in the instance.
|
Javalin |
Javalin.wsAfter(java.lang.String path,
java.util.function.Consumer<WsHandler> wsHandler)
Adds a WebSocket after handler for the specified path to the instance.
|
Javalin |
Javalin.wsBefore(java.util.function.Consumer<WsHandler> wsHandler)
Adds a WebSocket before handler for all routes in the instance.
|
Javalin |
Javalin.wsBefore(java.lang.String path,
java.util.function.Consumer<WsHandler> wsHandler)
Adds a WebSocket before handler for the specified path to the instance.
|
<T extends java.lang.Exception> |
Javalin.wsException(java.lang.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(java.util.function.Consumer<WsHandler> wsHandler)
Adds a WebSocket after handler for the current path to the
Javalin instance. |
Javalin |
ApiBuilder.wsAfter(java.lang.String path,
java.util.function.Consumer<WsHandler> wsHandler)
Adds a WebSocket after handler for the specified path to the
Javalin instance. |
Javalin |
ApiBuilder.wsBefore(java.util.function.Consumer<WsHandler> wsHandler)
Adds a WebSocket before handler for the current path to the
Javalin instance. |
Javalin |
ApiBuilder.wsBefore(java.lang.String path,
java.util.function.Consumer<WsHandler> wsHandler)
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,
java.util.function.Consumer<JavalinConfig> userConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
Plugin.apply(Javalin app)
Configure the Javalin instance and register handler
|
Copyright © 2021. All Rights Reserved.