Package org.apache.naming.resources
Class DirContextURLStreamHandlerService
- java.lang.Object
-
- java.net.URLStreamHandler
-
- org.osgi.service.url.AbstractURLStreamHandlerService
-
- org.apache.naming.resources.DirContextURLStreamHandlerService
-
- All Implemented Interfaces:
org.osgi.framework.BundleActivator,org.osgi.service.url.URLStreamHandlerService
public class DirContextURLStreamHandlerService extends org.osgi.service.url.AbstractURLStreamHandlerService implements org.osgi.framework.BundleActivatorThis class is responsible for addingDirContextURLStreamHandlerto OSGi service registry. As much as we would have liked it to be both an activator as well as a Startup service, we can't. In embedded mode, this Startup service would fail to load, so we have separated the startup servuce part toWebNamingStartupclass. That Startup service ensures that this bundle gets activated during server startup and the activator ensures that we register a jndi protocol handler.- Author:
- Sanjeeb.Sahoo@Sun.COM
-
-
Constructor Summary
Constructors Constructor Description DirContextURLStreamHandlerService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URLConnectionopenConnection(URL u)voidstart(org.osgi.framework.BundleContext context)voidstop(org.osgi.framework.BundleContext context)StringtoExternalForm(URL u)-
Methods inherited from class org.osgi.service.url.AbstractURLStreamHandlerService
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, parseURL, sameFile, setURL, setURL
-
Methods inherited from class java.net.URLStreamHandler
openConnection, parseURL
-
-
-
-
Method Detail
-
openConnection
public URLConnection openConnection(URL u) throws IOException
- Specified by:
openConnectionin interfaceorg.osgi.service.url.URLStreamHandlerService- Specified by:
openConnectionin classorg.osgi.service.url.AbstractURLStreamHandlerService- Throws:
IOException
-
toExternalForm
public String toExternalForm(URL u)
- Specified by:
toExternalFormin interfaceorg.osgi.service.url.URLStreamHandlerService- Overrides:
toExternalFormin classorg.osgi.service.url.AbstractURLStreamHandlerService
-
start
public void start(org.osgi.framework.BundleContext context) throws Exception- Specified by:
startin interfaceorg.osgi.framework.BundleActivator- Throws:
Exception
-
-