FileDocCategorySizeDatePackage
ResourceLinkRef.javaAPI DocApache Tomcat 6.0.143270Fri Jul 20 04:20:32 BST 2007org.apache.naming

ResourceLinkRef

public class ResourceLinkRef extends Reference
Represents a reference address to a resource.
author
Remy Maucherat
version
$Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $

Fields Summary
public static final String
DEFAULT_FACTORY
Default factory for this reference.
public static final String
GLOBALNAME
Description address type.
Constructors Summary
public ResourceLinkRef(String resourceClass, String globalName)
ResourceLink Reference.

param
resourceClass Resource class
param
globalName Global name



    // ----------------------------------------------------------- Constructors


                    
         
        this(resourceClass, globalName, null, null);
    
public ResourceLinkRef(String resourceClass, String globalName, String factory, String factoryLocation)
ResourceLink Reference.

param
resourceClass Resource class
param
globalName Global name

        super(resourceClass, factory, factoryLocation);
        StringRefAddr refAddr = null;
        if (globalName != null) {
            refAddr = new StringRefAddr(GLOBALNAME, globalName);
            add(refAddr);
        }
    
Methods Summary
public java.lang.StringgetFactoryClassName()
Retrieves the class name of the factory of the object to which this reference refers.

        String factory = super.getFactoryClassName();
        if (factory != null) {
            return factory;
        } else {
            factory = System.getProperty(Context.OBJECT_FACTORIES);
            if (factory != null) {
                return null;
            } else {
                return DEFAULT_FACTORY;
            }
        }