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 thePerContextHandlerRegistry
registries.
-
-
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 void
add(@NotNull PerContextHandlerRegistry registry)
Add a new context registration.PerContextHandlerRegistry
getBestMatchingRegistry(String requestURI)
org.apache.felix.http.base.internal.HttpConfig
getConfig()
@Nullable ServletResolution
getErrorHandler(@NotNull String requestURI, Long serviceId, int code, Throwable exception)
FilterHandler[]
getFilters(@NotNull ServletResolution pr, @NotNull jakarta.servlet.DispatcherType dispatcherType, @NotNull String requestURI)
PerContextHandlerRegistry
getRegistry(long key)
boolean
getRuntimeInfo(@NotNull org.osgi.service.servlet.runtime.dto.ServletContextDTO dto, @NotNull FailedDTOHolder failedDTOHolder)
void
init()
Register default context registry for Http Servicevoid
remove(@NotNull ServletContextHelperInfo info)
Remove a context registration.void
reset()
Reset to initial statePathResolution
resolveServlet(@NotNull String requestURI)
ServletResolution
resolveServletByName(long contextId, @NotNull String name)
Get the servlet handler for a servlet by namevoid
shutdown()
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 jakarta.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.servlet.runtime.dto.ServletContextDTO dto, @NotNull @NotNull FailedDTOHolder failedDTOHolder)
-
getBestMatchingRegistry
public PerContextHandlerRegistry getBestMatchingRegistry(String requestURI)
-
-