Package org.restheart.plugins
Interface PluginsRegistry
public interface PluginsRegistry
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddInterceptor(PluginRecord<Interceptor<?, ?>> i) getAuthenticator(String name) Set<PluginRecord<Interceptor<?, ?>>> getPipelineInfo(String path) Set<PluginRecord<Provider<?>>> List<Interceptor<?, ?>> getProxyInterceptors(InterceptPoint interceptPoint) io.undertow.server.handlers.PathHandlerGets the RESTHeart root handler Avoid adding handlers using PathHandler.addPrefixPath() or PathHandler.addExactPath().List<Interceptor<?, ?>> getServiceInterceptors(Service<?, ?> srv, InterceptPoint interceptPoint) Set<PluginRecord<Service<?, ?>>> voidplugPipeline(String path, PipelinedHandler handler, PipelineInfo info) Plugs a pipeline into the root handler binding it to the path; also sets its PipelineInfo.voidplugService(PluginRecord<Service<? extends ServiceRequest<?>, ? extends ServiceResponse<?>>> srv, String uri, RegisterPlugin.MATCH_POLICY mp, boolean secured) Plugs a service into the root handler binding it to the pathbooleanremoveInterceptorIf(Predicate<? super PluginRecord<Interceptor<?, ?>>> filter) voidunplug(String uri, RegisterPlugin.MATCH_POLICY mp) unplugs an handler from the root handler
-
Method Details
-
getAuthMechanisms
Set<PluginRecord<AuthMechanism>> getAuthMechanisms()- Returns:
- the authMechanisms
-
getAuthenticators
Set<PluginRecord<Authenticator>> getAuthenticators()- Returns:
- the authenticators
-
getAuthenticator
- Parameters:
name- the name of the authenticator- Returns:
- the authenticator
- Throws:
ConfigurationException
-
getTokenManager
PluginRecord<TokenManager> getTokenManager()- Returns:
- the authenticators
-
getAuthorizers
Set<PluginRecord<Authorizer>> getAuthorizers()- Returns:
- the authenticators
-
getPermissionTransformers
Set<BaseAclPermissionTransformer> getPermissionTransformers()- Returns:
- the permission transformers
-
getInitializers
Set<PluginRecord<Initializer>> getInitializers()- Returns:
- the initializers
-
getProviders
Set<PluginRecord<Provider<?>>> getProviders()- Returns:
- the providers
-
addInterceptor
- Parameters:
i-
-
removeInterceptorIf
- Parameters:
filter-- Returns:
- remove all interceptors that match the filter predicate
-
getServices
Set<PluginRecord<Service<?,?>>> getServices()- Returns:
- the services
-
getInterceptors
Set<PluginRecord<Interceptor<?,?>>> getInterceptors() -
getServiceInterceptors
- Parameters:
srv-interceptPoint-- Returns:
- the interceptors of the service srv
-
getProxyInterceptors
- Parameters:
interceptPoint-- Returns:
- the interceptors of the proxy
-
getRootPathHandler
io.undertow.server.handlers.PathHandler getRootPathHandler()Gets the RESTHeart root handler Avoid adding handlers using PathHandler.addPrefixPath() or PathHandler.addExactPath(). Instead use PluginsRegistry.plug() which sets also the correct PipelineInfo- Returns:
- the RESTHeart root handler
-
plugPipeline
Plugs a pipeline into the root handler binding it to the path; also sets its PipelineInfo.- Parameters:
path- If the request contains this path, run the pipelinehandler- The handler which is activated upon matchinfo- The PipelineInfo describing the handling pipeline
-
unplug
unplugs an handler from the root handler- Parameters:
uri-mp-
-
plugService
void plugService(PluginRecord<Service<? extends ServiceRequest<?>, ? extends ServiceResponse<?>>> srv, String uri, RegisterPlugin.MATCH_POLICY mp, boolean secured) Plugs a service into the root handler binding it to the path- Parameters:
srv- The service to pluguri- The URI to bind the service tomp- The match policy, either exact or prefixsecured- true to invoke the service only after authentication and authorization succeed
-
getPipelineInfo
- Parameters:
path-- Returns:
- the PipelineInfo of the pipeline handling the request
-