public final class PerContextHandlerRegistry extends Object implements Comparable<PerContextHandlerRegistry>
| Constructor and Description |
|---|
PerContextHandlerRegistry(@NotNull org.apache.felix.http.base.internal.HttpConfig config)
Default http service registry
|
PerContextHandlerRegistry(@NotNull ServletContextHelperInfo info,
@NotNull org.apache.felix.http.base.internal.HttpConfig config)
Registry for a servlet context helper (whiteboard support)
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(@NotNull PerContextHandlerRegistry other) |
org.apache.felix.http.base.internal.HttpConfig |
getConfig() |
long |
getContextServiceId() |
@Nullable ServletHandler |
getErrorHandler(int code,
@Nullable Throwable exception)
Get the servlet handling the error.
|
EventListenerRegistry |
getEventListenerRegistry() |
@NotNull FilterHandler[] |
getFilterHandlers(@Nullable ServletHandler servletHandler,
@NotNull javax.servlet.DispatcherType dispatcherType,
@NotNull String requestURI)
Get filter handlers for the request uri
|
void |
getRuntime(org.osgi.service.http.runtime.dto.ServletContextDTO dto,
FailedDTOHolder failedDTOHolder)
Create all DTOs for servlets, filters, resources and error pages
|
String |
isMatching(@NotNull String requestURI) |
void |
registerFilter(@NotNull FilterHandler handler)
Add a filter
|
void |
registerListeners(@NotNull ListenerHandler listenerHandler)
Register listeners
|
void |
registerServlet(@NotNull ServletHandler handler)
Add a servlet
|
void |
removeAll() |
PathResolution |
resolve(@NotNull String relativeRequestURI) |
ServletHandler |
resolveServletByName(String name) |
void |
unregisterFilter(@NotNull FilterInfo info,
boolean destroy)
Remove a filter
|
void |
unregisterListeners(@NotNull ListenerInfo info)
Unregister listeners
|
void |
unregisterServlet(@NotNull ServletInfo servletInfo,
boolean destroy)
Remove a servlet
|
public PerContextHandlerRegistry(@NotNull
@NotNull org.apache.felix.http.base.internal.HttpConfig config)
public PerContextHandlerRegistry(@NotNull
@NotNull ServletContextHelperInfo info,
@NotNull
@NotNull org.apache.felix.http.base.internal.HttpConfig config)
info - The servlet context helper infopublic long getContextServiceId()
public org.apache.felix.http.base.internal.HttpConfig getConfig()
public void removeAll()
public int compareTo(@NotNull
@NotNull PerContextHandlerRegistry other)
compareTo in interface Comparable<PerContextHandlerRegistry>public PathResolution resolve(@NotNull @NotNull String relativeRequestURI)
public ServletHandler resolveServletByName(String name)
@NotNull public @NotNull FilterHandler[] getFilterHandlers(@Nullable @Nullable ServletHandler servletHandler, @NotNull @NotNull javax.servlet.DispatcherType dispatcherType, @NotNull @NotNull String requestURI)
servletHandler - The servlet handler (might be null)dispatcherType - The dispatcher typerequestURI - The request uri@Nullable public @Nullable ServletHandler getErrorHandler(int code, @Nullable @Nullable Throwable exception)
code - The error codeexception - The optional exceptionnull.public EventListenerRegistry getEventListenerRegistry()
public void getRuntime(org.osgi.service.http.runtime.dto.ServletContextDTO dto,
FailedDTOHolder failedDTOHolder)
dto - The servlet context DTOfailedDTOHolder - The container for all failed DTOspublic void registerServlet(@NotNull
@NotNull ServletHandler handler)
handler - The servlet handlerpublic void unregisterServlet(@NotNull
@NotNull ServletInfo servletInfo,
boolean destroy)
servletInfo - The servlet infodestroy - Destroy the servletpublic void registerFilter(@NotNull
@NotNull FilterHandler handler)
handler - The filter handlerpublic void unregisterFilter(@NotNull
@NotNull FilterInfo info,
boolean destroy)
info - The filter infodestroy - Destroy the filterpublic void registerListeners(@NotNull
@NotNull ListenerHandler listenerHandler)
listenerHandler - public void unregisterListeners(@NotNull
@NotNull ListenerInfo info)
info - The listener infoCopyright © 2006–2021 The Apache Software Foundation. All rights reserved.