Package org.forgerock.openig.wellknown
Class WellKnownEndpointManager
java.lang.Object
org.forgerock.openig.wellknown.WellKnownEndpointManager
Offers an API to register well-known endpoint's handlers.
This is an evolving API, shouldn't be exposed to customers (at least yet).
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceRepresents a registered well-known endpoint that can be un-registered.static final recordRepresents a segment of an endpoint path. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFinds the handler associated with a given path.registerEndpoint(Handler handler, Filter filter, WellKnownEndpointManager.Segment suffix, List<WellKnownEndpointManager.Segment> segments) Registers a handler for a specific endpoint path, wrapping it with the given filter.registerEndpoint(Handler handler, Filter filter, WellKnownEndpointManager.Segment suffix, WellKnownEndpointManager.Segment... segments) Registers a handler for a specific endpoint path, wrapping it with the given filter.registerEndpoint(Handler handler, WellKnownEndpointManager.Segment suffix, WellKnownEndpointManager.Segment... segments) Registers a handler for a specific endpoint path.
-
Constructor Details
-
WellKnownEndpointManager
public WellKnownEndpointManager()
-
-
Method Details
-
registerEndpoint
public WellKnownEndpointManager.Endpoint registerEndpoint(Handler handler, WellKnownEndpointManager.Segment suffix, WellKnownEndpointManager.Segment... segments) throws AlreadyRegisteredException Registers a handler for a specific endpoint path.- Parameters:
handler- The handler to associate with the endpoint.suffix- The suffix segment of the endpoint path.segments- Additional path segments to append to the endpoint. (optional)- Returns:
- a new
WellKnownEndpointManager.Endpoint(to be used for un-registration) if registration was successful, throws exception otherwise. - Throws:
AlreadyRegisteredException- if the endpoint is already registered.
-
registerEndpoint
public WellKnownEndpointManager.Endpoint registerEndpoint(Handler handler, Filter filter, WellKnownEndpointManager.Segment suffix, WellKnownEndpointManager.Segment... segments) throws AlreadyRegisteredException Registers a handler for a specific endpoint path, wrapping it with the given filter. The filter is applied before the handler when the endpoint is matched.- Parameters:
handler- The handler to associate with the endpoint.filter- Filter to apply to requests before dispatching to the handler. (nullmeans no filter)suffix- The suffix segment of the endpoint path.segments- Additional path segments to append to the endpoint. (optional)- Returns:
- a new
WellKnownEndpointManager.Endpoint(to be used for un-registration) if registration was successful, throws exception otherwise. - Throws:
AlreadyRegisteredException- if the endpoint is already registered.
-
registerEndpoint
public WellKnownEndpointManager.Endpoint registerEndpoint(Handler handler, Filter filter, WellKnownEndpointManager.Segment suffix, List<WellKnownEndpointManager.Segment> segments) throws AlreadyRegisteredException Registers a handler for a specific endpoint path, wrapping it with the given filter. The filter is applied before the handler when the endpoint is matched.- Parameters:
handler- The handler to associate with the endpoint.filter- Filter to apply to requests before dispatching to the handler. (nullmeans no filter)suffix- The suffix segment of the endpoint path.segments- Additional path components to append to the endpoint. (can be empty, never null)- Returns:
- a new
WellKnownEndpointManager.Endpoint(to be used for un-registration) if registration was successful, throws exception otherwise. - Throws:
AlreadyRegisteredException- if the endpoint is already registered.
-
find
Finds the handler associated with a given path.- Parameters:
path- The path of the endpoint.- Returns:
- The handler associated with the path, or
nullif no handler is registered for the path.
-