Package org.forgerock.openig.http
Class EndpointRegistry
java.lang.Object
org.forgerock.openig.http.EndpointRegistry
Registry for Identity Gateway REST API endpoints.
 
Components can use that class to register additional endpoints into the /openig/api namespace:
- /openig/api/system/objects/[heap-object-name] for components defined in 
config.json - /openig/api/system/objects/.../[router-name]/routes/[route-name]/objects/[heap-object-name] for components defined inside routes
 
- See Also:
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHandle for un-registering an endpoint. - 
Constructor Summary
ConstructorsConstructorDescriptionEndpointRegistry(Router router, String path, boolean restricted) Creates a registry around the given Router instance. - 
Method Summary
Modifier and TypeMethodDescriptiongetPath()Returns this registry's base path.Returns the path info computed by appending the givennameto this registry's path.Registers a new endpoint under the givenname.booleanReturnstrueif this registry is restricted.<E extends Exception>
Optional<EndpointRegistry.Registration>tryRegister(String name, Supplier<Handler, E> handler) Registers a new endpoint under the givenname, but only if the registry is not restricted. 
- 
Constructor Details
- 
EndpointRegistry
Creates a registry around the given Router instance. Registered endpoints will be sub-elements of the givenrouter.- Parameters:
 router- base Routerpath- path for this registryrestricted-trueif this registry is restricted
 
 - 
 - 
Method Details
- 
register
Registers a new endpoint under the givenname.Equivalent to calling this
Routercode:router.addRoute(requestUriMatcher(STARTS_WITH, name), handler);- Parameters:
 name- registered endpoint namehandler- endpoint implementation- Returns:
 - a handle for later endpoint un-registration
 
 - 
tryRegister
public <E extends Exception> Optional<EndpointRegistry.Registration> tryRegister(String name, Supplier<Handler, E> handler) throws ERegisters a new endpoint under the givenname, but only if the registry is not restricted.Equivalent to calling this
Routercode:router.addRoute(requestUriMatcher(STARTS_WITH, name), handler); - 
pathInfo
Returns the path info computed by appending the givennameto this registry's path.- Parameters:
 name- path element to append- Returns:
 - composed path
 
 - 
getPath
Returns this registry's base path.- Returns:
 - this registry's base path.
 
 - 
restricted
public boolean restricted()Returnstrueif this registry is restricted.- Returns:
 trueif this registry is restricted.
 
 -