ResourceLinkFactory (Apache Tomcat 8.5.12 API Documentation)

org.apache.naming.factory

## Class ResourceLinkFactory

- java.lang.Object
- - org.apache.naming.factory.ResourceLinkFactory

- All Implemented Interfaces:
    ObjectFactory
  Direct Known Subclasses:
    DataSourceLinkFactory

      public class ResourceLinkFactory
      extends Object
      implements ObjectFactory

  Object factory for resource links.

  Author:
    Remy Maucherat

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResourceLinkFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `deregisterGlobalResourceAccess(Context globalContext)`
    `static void` | `deregisterGlobalResourceAccess(Context globalContext, String localName)`
    `Object` | `getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment)` Create a new DataSource instance.
    `static void` | `registerGlobalResourceAccess(Context globalContext, String localName, String globalName)`
    `static void` | `setGlobalContext(Context newGlobalContext)` Set the global context (note: can only be used once).

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

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

- - ### Constructor Detail

    - #### ResourceLinkFactory

          public ResourceLinkFactory()

  - ### Method Detail

    - #### setGlobalContext

          public static void setGlobalContext(Context newGlobalContext)

      Set the global context (note: can only be used once).
      Parameters:
        `newGlobalContext` - new global context value

    - #### registerGlobalResourceAccess

          public static void registerGlobalResourceAccess(Context globalContext,
                                          String localName,
                                          String globalName)

    - #### deregisterGlobalResourceAccess

          public static void deregisterGlobalResourceAccess(Context globalContext,
                                            String localName)

    - #### deregisterGlobalResourceAccess

          public static void deregisterGlobalResourceAccess(Context globalContext)

    - #### getObjectInstance

          public Object getObjectInstance(Object obj,
                                 Name name,
                                 Context nameCtx,
                                 Hashtable<?,?> environment)
                                   throws NamingException

      Create a new DataSource instance.
      Specified by:
        `getObjectInstance` in interface `ObjectFactory`
      Parameters:
        `obj` - The reference object describing the DataSource
      Throws:
        `NamingException`

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