public final class EndpointRegistry extends Object
Components can use that class to register additional endpoints into the /openig/api namespace:
config.json
GenericHeaplet.endpointRegistry()
Modifier and Type | Class and Description |
---|---|
static class |
EndpointRegistry.Registration
Handle for un-registering an endpoint.
|
Constructor and Description |
---|
EndpointRegistry(Router router,
String path)
Creates a registry around the given Router instance.
|
Modifier and Type | Method and Description |
---|---|
String |
getPath()
Returns this registry's base path.
|
String |
pathInfo(String name)
Returns the path info computed by appending the given
name to this registry's path. |
EndpointRegistry.Registration |
register(String name,
Handler handler)
Registers a new endpoint under the given
name . |
public EndpointRegistry.Registration register(String name, Handler handler)
name
.
Equivalent to calling this Router
code:
router.addRoute(requestUriMatcher(STARTS_WITH, name), handler);
name
- registered endpoint namehandler
- endpoint implementationpublic String pathInfo(String name)
name
to this registry's path.name
- path element to appendpublic String getPath()
Copyright 2011-2017 ForgeRock AS.