Class HandlerRegistry
- java.lang.Object
-
- org.apache.felix.http.base.internal.registry.HandlerRegistry
-
public final class HandlerRegistry extends Object
Registry for all services. The registry is organized per servlet context and is dispatching to one of thePerContextHandlerRegistryregistries.
-
-
Constructor Summary
Constructors Constructor Description HandlerRegistry(org.apache.felix.http.base.internal.HttpConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(@NotNull PerContextHandlerRegistry registry)Add a new context registration.PerContextHandlerRegistrygetBestMatchingRegistry(String requestURI)org.apache.felix.http.base.internal.HttpConfiggetConfig()@Nullable ServletResolutiongetErrorHandler(@NotNull String requestURI, Long serviceId, int code, Throwable exception)FilterHandler[]getFilters(@NotNull ServletResolution pr, @NotNull javax.servlet.DispatcherType dispatcherType, @NotNull String requestURI)PerContextHandlerRegistrygetRegistry(long key)booleangetRuntimeInfo(@NotNull org.osgi.service.http.runtime.dto.ServletContextDTO dto, @NotNull FailedDTOHolder failedDTOHolder)voidinit()Register default context registry for Http Servicevoidremove(@NotNull ServletContextHelperInfo info)Remove a context registration.voidreset()Reset to initial statePathResolutionresolveServlet(@NotNull String requestURI)ServletResolutionresolveServletByName(long contextId, @NotNull String name)Get the servlet handler for a servlet by namevoidshutdown()Shutdown
-
-
-
Method Detail
-
getConfig
public org.apache.felix.http.base.internal.HttpConfig getConfig()
-
init
public void init()
Register default context registry for Http Service
-
reset
public void reset()
Reset to initial state
-
shutdown
public void shutdown()
Shutdown
-
remove
public void remove(@NotNull @NotNull ServletContextHelperInfo info)Remove a context registration.- Parameters:
info- The servlet context helper info
-
add
public void add(@NotNull @NotNull PerContextHandlerRegistry registry)Add a new context registration.
-
getRegistry
public PerContextHandlerRegistry getRegistry(long key)
-
getErrorHandler
@Nullable public @Nullable ServletResolution getErrorHandler(@NotNull @NotNull String requestURI, Long serviceId, int code, Throwable exception)
-
getFilters
public FilterHandler[] getFilters(@NotNull @NotNull ServletResolution pr, @NotNull @NotNull javax.servlet.DispatcherType dispatcherType, @NotNull @NotNull String requestURI)
-
resolveServlet
public PathResolution resolveServlet(@NotNull @NotNull String requestURI)
-
resolveServletByName
public ServletResolution resolveServletByName(long contextId, @NotNull @NotNull String name)
Get the servlet handler for a servlet by name- Parameters:
contextId- The context idname- The servlet name- Returns:
- The servlet handler or
null
-
getRuntimeInfo
public boolean getRuntimeInfo(@NotNull @NotNull org.osgi.service.http.runtime.dto.ServletContextDTO dto, @NotNull @NotNull FailedDTOHolder failedDTOHolder)
-
getBestMatchingRegistry
public PerContextHandlerRegistry getBestMatchingRegistry(String requestURI)
-
-