Package io.javalin.router
Class Endpoint
-
- All Implemented Interfaces:
public class Endpoint
Represents an HTTP endpoint in the application.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
Endpoint.Companion
-
Constructor Summary
Constructors Constructor Description Endpoint(HandlerType method, String path, RouteRole roles, Handler handler)
Endpoint(HandlerType method, String path, Set<EndpointMetadata> metadata, Handler handler)
Endpoint(HandlerType method, String path, Handler handler)
-
Method Summary
Modifier and Type Method Description final Set<RouteRole>
getRoles()
final HandlerType
getMethod()
final String
getPath()
final Handler
getHandler()
final Context
handle(Context ctx)
Execute the endpoint handler with the given context final Context
handle(EndpointExecutor executor)
Execute the endpoint handler with the given executor final <METADATA extends EndpointMetadata> METADATA
metadata(Class<METADATA> key)
final static Endpoint.Companion.EndpointBuilder
create(HandlerType method, String path)
-
-
Constructor Detail
-
Endpoint
Endpoint(HandlerType method, String path, RouteRole roles, Handler handler)
-
Endpoint
Endpoint(HandlerType method, String path, Set<EndpointMetadata> metadata, Handler handler)
- Parameters:
method
- The HTTP method of the endpointpath
- The path of the endpointmetadata
- The metadata of the endpointhandler
- The handler of the endpoint
-
Endpoint
Endpoint(HandlerType method, String path, Handler handler)
- Parameters:
method
- The HTTP method of the endpointpath
- The path of the endpointhandler
- The handler of the endpoint
-
-
Method Detail
-
getMethod
final HandlerType getMethod()
-
getHandler
final Handler getHandler()
-
handle
final Context handle(EndpointExecutor executor)
Execute the endpoint handler with the given executor
-
metadata
final <METADATA extends EndpointMetadata> METADATA metadata(Class<METADATA> key)
-
create
@Deprecated(message = "Experimental feature") final static Endpoint.Companion.EndpointBuilder create(HandlerType method, String path)
-
-
-
-