Class Routers
- java.lang.Object
-
- org.glassfish.jersey.server.internal.routing.Routers
-
final class Routers extends java.lang.Object
Routing tree assembly utilities.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Routers.EndpointRouter
-
Field Summary
Fields Modifier and Type Field Description private static Router
IDENTITY_ROUTER
-
Constructor Summary
Constructors Modifier Constructor Description private
Routers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Router
endpoint(Endpoint endpoint)
static Endpoint
extractEndpoint(Router router)
Extract endpoint stored in a router (if any).static Router
noop()
Create a terminal "no-op router" that accepts any input context and returns the unchanged request and an empty continuation iterator.
-
-
-
Field Detail
-
IDENTITY_ROUTER
private static final Router IDENTITY_ROUTER
-
-
Method Detail
-
noop
public static Router noop()
Create a terminal "no-op router" that accepts any input context and returns the unchanged request and an empty continuation iterator.- Returns:
- a terminal "no-op" router.
-
endpoint
public static Router endpoint(Endpoint endpoint)
Creates a terminalRouter
that wraps the givenendpoint
. TheRouter.apply(org.glassfish.jersey.server.internal.process.RequestProcessingContext)
method of the created hierarchical router returns the unchanged request and an empty continuation iterator.- Parameters:
endpoint
- a server-side endpoint to be wrapped in a router instance.- Returns:
- a router that wraps the supplied endpoint.
-
-