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, WellKnownEndpointManager.Segment suffix, List<WellKnownEndpointManager.Segment> segments) Registers a handler for a specific endpoint path.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, null otherwise. - Throws:
AlreadyRegisteredException
-
registerEndpoint
public WellKnownEndpointManager.Endpoint registerEndpoint(Handler handler, WellKnownEndpointManager.Segment suffix, List<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 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, null otherwise. - Throws:
AlreadyRegisteredException
-
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.
-