com.sapportals.portal.prt.util

Class AutoClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by com.sap.engine.frame.core.load.ReferencedLoader
              extended by com.sapportals.portal.prt.util.AutoClassLoader

Deprecated. Note: Due to architectural chnages in the prt infrastructure, this class is no longer used for class loading. See http://help.sap.com for more details.

public class AutoClassLoader
extends com.sap.engine.frame.core.load.ReferencedLoader

The AutoClassLoader is the class loader implementation used by the Java iView Runtime. It differs from an ordinary class loader by the following features:

Notes: Copyright (c) SAP Portals Europe GmbH 2001


Field Summary
 
Fields inherited from class com.sap.engine.frame.core.load.ReferencedLoader
CLASS_NOT_FOUND_EXCEPTION, classes, DEBUG_PROPERTY, debugMode, domain, globalDebugMode, parentLoader, useNegativeCache
 
Constructor Summary
AutoClassLoader(ClassLoader parentLoader)
          Deprecated. Constructor
AutoClassLoader(ClassLoader parentLoader, Object token)
          Deprecated. Constructor with registration to parent (if applicable)
AutoClassLoader(ClassLoader parentLoader, Object token, boolean transitive)
          Deprecated. Constructor with registration to parent (if applicable) and transitivity setting.
AutoClassLoader(ClassLoader parentLoader, Object token, Object[] delegationTokens)
          Deprecated. Constructor with registration to parent and definition of default tokens.
AutoClassLoader(ClassLoader parentLoader, Object token, Object[] delegationTokens, boolean transitive)
          Deprecated. Constructor with registration to parent and definition of default tokens and transitivity setting.
AutoClassLoader(ClassLoader parentLoader, Object token, Object[] delegationTokens, boolean transitive, boolean cyclic)
          Deprecated.  
 
Method Summary
 void addClassProtectionPrefix(String prefix)
          Deprecated. Adds a class prefix to the list of protected class prefixes.
 void addFile(File file)
          Deprecated. Adds a url to the current classpath
 void addFolder(File folder)
          Deprecated. Add a Folder to the classpath
 void addJarsInFolder(File libFolder)
          Deprecated. Adds all jar files in the specfied folder to the classpath
 void addResourceProtectionPrefix(String prefix)
          Deprecated. Adds a resource prefix to the list of protected resource prefixes.
protected  Package definePackage(String name, Manifest man, URL url)
          Deprecated.  
protected  Class findClass(String name)
          Deprecated. The crucial methods Finds a class.
protected  Enumeration findLocalResources(String fileName)
          Deprecated.  
protected  URL findResource(String name)
          Deprecated. find a resource in the current class path
protected  Enumeration findResources(String name)
          Deprecated. Find the resources
protected  URL getLocalResource(String fileName)
          Deprecated.  
protected  InputStream getLocalResourceAsStream(String fileName)
          Deprecated.  
 Vector getPath()
          Deprecated. Returns a Vector containing the path of this loader.
 Vector getPaths(boolean withDependencies)
          Deprecated. Returns a Vector of path.
static Vector getPaths(ClassLoader loader, Object[] tokens, boolean delegateToParent)
          Deprecated. Returns a Vector of path.
 URL getResource(Object[] tokens, String name, boolean delegateToParent)
          Deprecated. This version of getResource respects a propagation barrier, i.e. it will not delegate loading of specified resources or resources that have a specified name space.
 URL getResource(String name)
          Deprecated. This is the default signature of getResource
 InputStream getResourceAsStream(String name)
          Deprecated. This version of getResourceAsStream switches off the cache of resource bundles.
 String[] getResourceNames()
          Deprecated.  
protected  Class loadClass(Object[] tokens, String name, boolean resolve, boolean delegateToParent)
          Deprecated. This version of loadClass respects a propagation barrier, i.e. it will not delegate loading of specified classes or classes that have a specified name space.
 Class loadClass(String name, boolean resolve)
          Deprecated. This is the default version of loadClass
protected  Class loadLocalClass(String className, String fileName)
          Deprecated.  
protected  byte[] modifyByteCode(String className, byte[] bytes)
          Deprecated. This method exists only for api compatability. Execution of this method will return null value.
 void registerDelegationLoader(Object token, AutoClassLoader loader)
          Deprecated. Hierarchy handling: here child loaders may register by token.
 void release()
          Deprecated. Release.
 void setForceDelegationToParent(boolean p_b)
          Deprecated.  
 String toString()
          Deprecated.  
 void unregisterDelegationLoader(Object token)
          Deprecated. Hierarchy handling: here child loader may unregister by token.
 
Methods inherited from class com.sap.engine.frame.core.load.ReferencedLoader
clearNegativeCache, clearNegativeCacheInReferees, definePackage, findRefResources, findResourcesByReference, getAdditionalInfo, getInfo, getLoadedClasses, getName, getParentLoader, getParentName, getReferencesFrom, getReferencesTo, getRefResource, getRefResourceAsStream, getResourceAsStreamByReference, getResourceByReference, invalidate, loadClass, loadClassByReference, loadRefClass, negativeCacheContains, prepareForRemove, setDebugMode, setLockMonitor, setName, setUseNegativeCache
 
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass, getPermissions
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AutoClassLoader

public AutoClassLoader(ClassLoader parentLoader)
Deprecated. 
Constructor


AutoClassLoader

public AutoClassLoader(ClassLoader parentLoader,
                       Object token)
Deprecated. 
Constructor with registration to parent (if applicable)


AutoClassLoader

public AutoClassLoader(ClassLoader parentLoader,
                       Object token,
                       Object[] delegationTokens)
Deprecated. 
Constructor with registration to parent and definition of default tokens.


AutoClassLoader

public AutoClassLoader(ClassLoader parentLoader,
                       Object token,
                       boolean transitive)
Deprecated. 
Constructor with registration to parent (if applicable) and transitivity setting.

The transitivity flag indicates whether this loader is used in an assured transitive class loader set up. This means that it will never be called with a set of delegation tokens that is not a superset of its own tokens. This must be ensured by its using environment. If this cannot be ensured, this loader should not be set to be in a transitive setup.


AutoClassLoader

public AutoClassLoader(ClassLoader parentLoader,
                       Object token,
                       Object[] delegationTokens,
                       boolean transitive)
Deprecated. 
Constructor with registration to parent and definition of default tokens and transitivity setting.

The transitivity flag indicates whether this loader is used in an assured transitive class loader set up. This means that it will never be called with a set of delegation tokens that is not a superset of its own tokens. This must be ensured by its using environment. If this cannot be ensured, this loader should not be set to be in a transitive setup.


AutoClassLoader

public AutoClassLoader(ClassLoader parentLoader,
                       Object token,
                       Object[] delegationTokens,
                       boolean transitive,
                       boolean cyclic)
Deprecated. 
Method Detail

release

public void release()
Deprecated. 
Release. To do here: unregister if registered before, release the class path, release the class cache... i.e.: shut down!


registerDelegationLoader

public void registerDelegationLoader(Object token,
                                     AutoClassLoader loader)
Deprecated. 
Hierarchy handling: here child loaders may register by token.


unregisterDelegationLoader

public void unregisterDelegationLoader(Object token)
Deprecated. 
Hierarchy handling: here child loader may unregister by token.


addFile

public void addFile(File file)
Deprecated. 
Adds a url to the current classpath


addJarsInFolder

public void addJarsInFolder(File libFolder)
Deprecated. 
Adds all jar files in the specfied folder to the classpath


addFolder

public void addFolder(File folder)
Deprecated. 
Add a Folder to the classpath


addClassProtectionPrefix

public void addClassProtectionPrefix(String prefix)
Deprecated. 
Adds a class prefix to the list of protected class prefixes.


addResourceProtectionPrefix

public void addResourceProtectionPrefix(String prefix)
Deprecated. 
Adds a resource prefix to the list of protected resource prefixes.


getPaths

public Vector getPaths(boolean withDependencies)
Deprecated. 
Returns a Vector of path.


getPaths

public static Vector getPaths(ClassLoader loader,
                              Object[] tokens,
                              boolean delegateToParent)
Deprecated. 
Returns a Vector of path.


getPath

public Vector getPath()
Deprecated. 
Returns a Vector containing the path of this loader.


toString

public String toString()
Deprecated. 
Overrides:
toString in class com.sap.engine.frame.core.load.ReferencedLoader

findClass

protected Class findClass(String name)
                   throws ClassNotFoundException
Deprecated. 
The crucial methods Finds a class. If it cannot be found, throw a classnotfound exception. to be called from a synchronized block! This implementation is to satisfy the inheritance promise. Internally we use the other "unsecure" and non-exception-throwing version.

Overrides:
findClass in class com.sap.engine.frame.core.load.ReferencedLoader
Throws:
ClassNotFoundException

definePackage

protected Package definePackage(String name,
                                Manifest man,
                                URL url)
                         throws IllegalArgumentException
Deprecated. 
Throws:
IllegalArgumentException

loadClass

protected Class loadClass(Object[] tokens,
                          String name,
                          boolean resolve,
                          boolean delegateToParent)
Deprecated. 
This version of loadClass respects a propagation barrier, i.e. it will not delegate loading of specified classes or classes that have a specified name space. Furthermore, it respects the delegation tokens mechanism. I.e. if it gets passed a list of delegation tokens, it will try to identify corresponding registered delegation loaders and give them a try after delegating up to the parent loader and looking locally.

Parameters:
tokens - the delegation tokens to be used for further delegation
name - the name of the class to be loaded
resolve - resolve (initialize) the class right after loading
delegateToParent - is this loader supposed to delegate to its parent, or simply look locally and by side delegation See ClassLoader for the general documentation.

loadClass

public Class loadClass(String name,
                       boolean resolve)
                throws ClassNotFoundException
Deprecated. 
This is the default version of loadClass

Overrides:
loadClass in class com.sap.engine.frame.core.load.ReferencedLoader
Throws:
ClassNotFoundException

findResource

protected URL findResource(String name)
Deprecated. 
find a resource in the current class path

Overrides:
findResource in class ClassLoader

findResources

protected Enumeration findResources(String name)
                             throws IOException
Deprecated. 
Find the resources

Overrides:
findResources in class com.sap.engine.frame.core.load.ReferencedLoader
Throws:
IOException

getResourceAsStream

public InputStream getResourceAsStream(String name)
Deprecated. 
This version of getResourceAsStream switches off the cache of resource bundles. Switching off the cache is mandatory to allow hot deployment of portal applications including resource bundles in their JARs. This is a workaround recommended by SUN; please check: http://developer.java.sun.com/developer/bugParade/bugs/4386865.html

Overrides:
getResourceAsStream in class com.sap.engine.frame.core.load.ReferencedLoader

getResource

public URL getResource(Object[] tokens,
                       String name,
                       boolean delegateToParent)
Deprecated. 
This version of getResource respects a propagation barrier, i.e. it will not delegate loading of specified resources or resources that have a specified name space. Furthermore, it respects the delegation tokens mechanism. I.e. if it gets passed a list of delegation tokens, it will try to identify corresponding registered delegation loaders and give them a try after delegating up to the parent loader and looking locally See ClassLoader for the general documentation.


getResource

public URL getResource(String name)
Deprecated. 
This is the default signature of getResource

Overrides:
getResource in class com.sap.engine.frame.core.load.ReferencedLoader

loadLocalClass

protected Class loadLocalClass(String className,
                               String fileName)
                        throws ClassNotFoundException
Deprecated. 
Specified by:
loadLocalClass in class com.sap.engine.frame.core.load.ReferencedLoader
Throws:
ClassNotFoundException

getLocalResource

protected URL getLocalResource(String fileName)
Deprecated. 
Specified by:
getLocalResource in class com.sap.engine.frame.core.load.ReferencedLoader

findLocalResources

protected Enumeration findLocalResources(String fileName)
                                  throws IOException
Deprecated. 
Specified by:
findLocalResources in class com.sap.engine.frame.core.load.ReferencedLoader
Throws:
IOException

getLocalResourceAsStream

protected InputStream getLocalResourceAsStream(String fileName)
Deprecated. 
Specified by:
getLocalResourceAsStream in class com.sap.engine.frame.core.load.ReferencedLoader

getResourceNames

public String[] getResourceNames()
Deprecated. 
Specified by:
getResourceNames in class com.sap.engine.frame.core.load.ReferencedLoader

setForceDelegationToParent

public void setForceDelegationToParent(boolean p_b)
Deprecated. 
Parameters:
p_b -

modifyByteCode

protected byte[] modifyByteCode(String className,
                                byte[] bytes)
Deprecated. This method exists only for api compatability. Execution of this method will return null value.

Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/lib/api api EP-PIN
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/api api EP-PIN


Copyright 2011 SAP AG Complete Copyright Notice