DirContextURLStreamHandlerFactory (Apache Tomcat 7.0.96 API Documentation)

org.apache.naming.resources

## Class DirContextURLStreamHandlerFactory

- java.lang.Object
- - org.apache.naming.resources.DirContextURLStreamHandlerFactory

- All Implemented Interfaces:
    java.net.URLStreamHandlerFactory

      public class DirContextURLStreamHandlerFactory
      extends java.lang.Object
      implements java.net.URLStreamHandlerFactory

  Factory for Stream handlers to a JNDI directory context, or for Stream handlers to a classpath url, which also supports users specifying additional stream handler.
  Author:
    Remy Maucherat

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addUserFactory(java.net.URLStreamHandlerFactory factory)`
    `java.net.URLStreamHandler` | `createURLStreamHandler(java.lang.String protocol)` Creates a new URLStreamHandler instance with the specified protocol.
    `static DirContextURLStreamHandlerFactory` | `getInstance()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getInstance

          public static DirContextURLStreamHandlerFactory getInstance()

    - #### addUserFactory

          public static void addUserFactory(java.net.URLStreamHandlerFactory factory)

    - #### createURLStreamHandler

          public java.net.URLStreamHandler createURLStreamHandler(java.lang.String protocol)

      Creates a new URLStreamHandler instance with the specified protocol. Will return null if the protocol is not `jndi`.
      Specified by:
        `createURLStreamHandler` in interface `java.net.URLStreamHandlerFactory`
      Parameters:
        `protocol` - the protocol (must be "jndi" here)
      Returns:
        a URLStreamHandler for the jndi protocol, or null if the protocol is not JNDI

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.