Package org.keycloak.adapters.osgi
Class ServletReregistrationService
- java.lang.Object
-
- org.keycloak.adapters.osgi.ServletReregistrationService
-
public class ServletReregistrationService extends Object
Service, which allows to remove previously registered servlets in karaf/fuse environment. It assumes that particular servlet was previously registered as service in OSGI container underServletinterface.The point is to register automatically registered builtin servlet endpoints (like "/cxf" for instance) to allow secure them by Keycloak and re-register them again
- Author:
- Marek Posolda
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.jboss.logging.Loggerlog
-
Constructor Summary
Constructors Constructor Description ServletReregistrationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.ops4j.pax.web.service.WebContainerfindExternalWebContainer()Find web container in the bundle, where was servlet originally registeredorg.osgi.framework.BundleContextgetBundleContext()org.osgi.framework.ServiceReferencegetManagedServiceReference()protected voidregisterServlet(org.ops4j.pax.web.service.WebContainer webContainer, Dictionary properties)Code comes from org.apache.cxf.transport.http.osgi.ServletExporter#updated(java.util.Dictionary)voidsetBundleContext(org.osgi.framework.BundleContext bundleContext)voidsetManagedServiceReference(org.osgi.framework.ServiceReference managedServiceReference)voidstart()voidstop()
-
-
-
Method Detail
-
getBundleContext
public org.osgi.framework.BundleContext getBundleContext()
-
setBundleContext
public void setBundleContext(org.osgi.framework.BundleContext bundleContext)
-
start
public void start()
-
stop
public void stop()
-
registerServlet
protected void registerServlet(org.ops4j.pax.web.service.WebContainer webContainer, Dictionary properties)Code comes from org.apache.cxf.transport.http.osgi.ServletExporter#updated(java.util.Dictionary)- Parameters:
webContainer-properties-
-
findExternalWebContainer
protected org.ops4j.pax.web.service.WebContainer findExternalWebContainer()
Find web container in the bundle, where was servlet originally registered- Returns:
- web container or null
-
getManagedServiceReference
public org.osgi.framework.ServiceReference getManagedServiceReference()
-
setManagedServiceReference
public void setManagedServiceReference(org.osgi.framework.ServiceReference managedServiceReference)
-
-