Java Doc for RepositoryClassLoader.java in  » EJB-Server-JBoss-4.2.1 » jmx » org » jboss » mx » loading » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server JBoss 4.2.1 » jmx » org.jboss.mx.loading 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.net.URLClassLoader
   org.jboss.mx.loading.RepositoryClassLoader

All known Subclasses:   org.jboss.mx.loading.MLetRepositoryClassLoader,  org.jboss.mx.loading.UnifiedClassLoader,
RepositoryClassLoader
abstract public class RepositoryClassLoader extends URLClassLoader (Code)
A RepositoryClassLoader.
author:
   Adrian Brock
version:
   $Revision: 60321 $


Field Summary
protected  ReentrantLockloadLock
    
protected  ClassLoaderparent
    
protected  LoaderRepositoryrepository
     Reference to the repository.
protected  ExceptionunregisterTrace
    

Constructor Summary
protected  RepositoryClassLoader(URL[] urls, ClassLoader parent)
    

Method Summary
protected  voidacquire()
     Acquire the class loading lock.
public  voidaddToClassBlackList(String name)
    
public  voidaddToResourceBlackList(String name)
    
public  voidaddURL(URL url)
    
protected  booleanattempt(long waitMS)
     Attempt to acquire the class loading lock.
public  voidclearBlackLists()
    
public  voidclearClassBlackList()
     Clear any class black list.
public  voidclearResourceBlackList()
     Clear any resource blacklist.
protected  voiddefinePackage(String className)
    
final public  booleanequals(Object other)
     This is here to document that this must delegate to the super implementation to perform identity based equality.
protected  ClassfindClass(String name)
     Called by loadClassLocally to find the requested class within this class loaders class path.
protected  ClassfindClassLocally(String name)
    
public  EnumerationfindResources(String name)
     Find all resource URLs for the given name.
public  EnumerationfindResourcesLocally(String name)
     Provides the same functionality as java.net.URLClassLoader.findResources .
public  intgetAddedOrder()
    
public  URL[]getAllURLs()
    
public  URL[]getClasspath()
     This method simply invokes the super.getURLs() method to access the list of URLs that make up the RepositoryClassLoader classpath.
public  LoaderRepositorygetLoaderRepository()
    
abstract public  ObjectNamegetObjectName()
    
public  PackagegetPackage(String name)
    
public  Package[]getPackages()
    
protected  ProtectionDomaingetProtectionDomain(URL codesourceUrl)
     Determine the protection domain.
public  URLgetResource(String name)
     Attempts to load the resource from its URL and if not found forwards to the request to LoaderRepository .
public  URLgetResourceLocally(String name)
     Provides the same functionality as java.net.URLClassLoader.getResource .
public  URLgetURL()
     Get the URL associated with the UCL.
public  URL[]getURLs()
     Return an empty URL array to force the RMI marshalling subsystem to use the java.server.codebase property as the annotated codebase.
final public  inthashCode()
     This is here to document that this must delegate to the super implementation to perform identity based hashing.
public  booleanisClassBlackListed(String name)
    
public  booleanisResourceBlackListed(String name)
    
protected  byte[]loadByteCode(String classname)
     Obtain the bytecode for the indicated class from this class loaders classpath.
protected  byte[]loadByteCode(URL classURL)
     Obtain the bytecode for the indicated class from this class loaders classpath.
public  ClassloadClass(String name, boolean resolve)
     The only caller of this method should be the VM initiated loadClassInternal() method.
public  ClassloadClassBefore(String name)
     The only caller of this method should be the VM initiated loadClassInternal() method.
public synchronized  ClassloadClassImpl(String name, boolean resolve, int stopAt)
    
public  ClassloadClassLocally(String name, boolean resolve)
     Called to attempt to load a class from the set of URLs associated with this classloader.
protected  voidrelease()
     Release the class loading lock previous acquired through the acquire method.
public  voidremoveFromClassBlackList(String name)
    
public  voidremoveFromResourceBlackList(String name)
    
public  voidsetAddedOrder(int addedOrder)
    
public  voidsetRepository(LoaderRepository repository)
    
public  StringtoString()
     Returns a string representation.
public  voidunregister()
    

Field Detail
loadLock
protected ReentrantLock loadLock(Code)
Lock



parent
protected ClassLoader parent(Code)
The parent classloader



repository
protected LoaderRepository repository(Code)
Reference to the repository.



unregisterTrace
protected Exception unregisterTrace(Code)
The location where unregister is called from




Constructor Detail
RepositoryClassLoader
protected RepositoryClassLoader(URL[] urls, ClassLoader parent)(Code)
Create a new LoaderRepositoryClassLoader
Parameters:
  urls - the urls
Parameters:
  parent - the parent classloader




Method Detail
acquire
protected void acquire()(Code)
Acquire the class loading lock. This lock must be acquired before a thread enters the class loading task loop in loadClass.
See Also:   RepositoryClassLoader.loadClass(String,boolean)



addToClassBlackList
public void addToClassBlackList(String name)(Code)
Black list a class
Parameters:
  name - the name of the class



addToResourceBlackList
public void addToResourceBlackList(String name)(Code)
Black list a resource
Parameters:
  name - the name of the resource



addURL
public void addURL(URL url)(Code)
Append the given url to the URLs used for class and resource loading
Parameters:
  url - the URL to load from



attempt
protected boolean attempt(long waitMS)(Code)
Attempt to acquire the class loading lock. This lock must be acquired before a thread enters the class loading task loop in loadClass. This method maintains any interrupted state of the calling thread.
See Also:   RepositoryClassLoader.loadClass(String,boolean)



clearBlackLists
public void clearBlackLists()(Code)
Clear all blacklists



clearClassBlackList
public void clearClassBlackList()(Code)
Clear any class black list.



clearResourceBlackList
public void clearResourceBlackList()(Code)
Clear any resource blacklist.



definePackage
protected void definePackage(String className)(Code)
Define the package for the class if not already done
Parameters:
  className - the class name



equals
final public boolean equals(Object other)(Code)
This is here to document that this must delegate to the super implementation to perform identity based equality. Using URL based equality caused conflicts with the Class.forName(String, boolean, ClassLoader).



findClass
protected Class findClass(String name) throws ClassNotFoundException(Code)
Called by loadClassLocally to find the requested class within this class loaders class path.
Parameters:
  name - the name of the class the resulting class
exception:
  ClassNotFoundException - if the class could not be found



findClassLocally
protected Class findClassLocally(String name) throws ClassNotFoundException(Code)
Find the class
Parameters:
  name - the name of the class the class



findResources
public Enumeration findResources(String name) throws IOException(Code)
Find all resource URLs for the given name. This overrides the URLClassLoader version to look for resources in the repository.
Parameters:
  name - the name of the resource Enumeration
throws:
  java.io.IOException -



findResourcesLocally
public Enumeration findResourcesLocally(String name) throws IOException(Code)
Provides the same functionality as java.net.URLClassLoader.findResources .



getAddedOrder
public int getAddedOrder()(Code)
Get the order this classloader was added to the repository the order



getAllURLs
public URL[] getAllURLs()(Code)
Return all library URLs associated with this RepositoryClassLoader

Do not remove this method without running the WebIntegrationTestSuite




getClasspath
public URL[] getClasspath()(Code)
This method simply invokes the super.getURLs() method to access the list of URLs that make up the RepositoryClassLoader classpath. the urls that make up the classpath



getLoaderRepository
public LoaderRepository getLoaderRepository()(Code)
Get the loader repository for this classloader



getObjectName
abstract public ObjectName getObjectName() throws MalformedObjectNameException(Code)
Get the ObjectName the object name



getPackage
public Package getPackage(String name)(Code)



getPackages
public Package[] getPackages()(Code)



getProtectionDomain
protected ProtectionDomain getProtectionDomain(URL codesourceUrl)(Code)
Determine the protection domain. If we are a copy of the original deployment, use the original url as the codebase. the protection domain



getResource
public URL getResource(String name)(Code)
Attempts to load the resource from its URL and if not found forwards to the request to LoaderRepository .



getResourceLocally
public URL getResourceLocally(String name)(Code)
Provides the same functionality as java.net.URLClassLoader.getResource .



getURL
public URL getURL()(Code)
Get the URL associated with the UCL. the url



getURLs
public URL[] getURLs()(Code)
Return an empty URL array to force the RMI marshalling subsystem to use the java.server.codebase property as the annotated codebase.

Do not remove this method without discussing it on the dev list. Empty URL[]




hashCode
final public int hashCode()(Code)
This is here to document that this must delegate to the super implementation to perform identity based hashing. Using URL based hashing caused conflicts with the Class.forName(String, boolean, ClassLoader).



isClassBlackListed
public boolean isClassBlackListed(String name)(Code)
Is the class black listed?
Parameters:
  name - the name of the class true when the class is black listed, false otherwise



isResourceBlackListed
public boolean isResourceBlackListed(String name)(Code)
Is the resource black listed?
Parameters:
  name - the name of the resource true when the resource is black listed, false otherwise



loadByteCode
protected byte[] loadByteCode(String classname) throws ClassNotFoundException, IOException(Code)
Obtain the bytecode for the indicated class from this class loaders classpath.
Parameters:
  classname - the bytecode array if found
exception:
  ClassNotFoundException - - if the class resource could notbe found



loadByteCode
protected byte[] loadByteCode(URL classURL) throws ClassNotFoundException, IOException(Code)
Obtain the bytecode for the indicated class from this class loaders classpath.
Parameters:
  classURL - the bytecode array if found
exception:
  ClassNotFoundException - - if the class resource could notbe found



loadClass
public Class loadClass(String name, boolean resolve) throws ClassNotFoundException(Code)
The only caller of this method should be the VM initiated loadClassInternal() method. This method attempts to acquire the UnifiedLoaderRepository2 lock and then asks the repository to load the class.

Forwards request to LoaderRepository .




loadClassBefore
public Class loadClassBefore(String name) throws ClassNotFoundException(Code)
The only caller of this method should be the VM initiated loadClassInternal() method. This method attempts to acquire the UnifiedLoaderRepository2 lock and then asks the repository to load the class.

Forwards request to LoaderRepository .




loadClassImpl
public synchronized Class loadClassImpl(String name, boolean resolve, int stopAt) throws ClassNotFoundException(Code)



loadClassLocally
public Class loadClassLocally(String name, boolean resolve) throws ClassNotFoundException(Code)
Called to attempt to load a class from the set of URLs associated with this classloader.



release
protected void release()(Code)
Release the class loading lock previous acquired through the acquire method.



removeFromClassBlackList
public void removeFromClassBlackList(String name)(Code)
Remove class from black list
Parameters:
  name - the name of the class



removeFromResourceBlackList
public void removeFromResourceBlackList(String name)(Code)
Remove resource from black list
Parameters:
  name - the name of the resource



setAddedOrder
public void setAddedOrder(int addedOrder)(Code)
Set the order this classloader was added to the repository
Parameters:
  addedOrder - the added order



setRepository
public void setRepository(LoaderRepository repository)(Code)
Set the loader repository
Parameters:
  repository - the repository



toString
public String toString()(Code)
Returns a string representation.



unregister
public void unregister()(Code)



Methods inherited from java.net.URLClassLoader
protected void addURL(URL url)(Code)(Java Doc)
protected Package definePackage(String name, Manifest man, URL url) throws IllegalArgumentException(Code)(Java Doc)
protected Class findClass(String name) throws ClassNotFoundException(Code)(Java Doc)
public URL findResource(String name)(Code)(Java Doc)
public Enumeration<URL> findResources(String name) throws IOException(Code)(Java Doc)
protected PermissionCollection getPermissions(CodeSource codesource)(Code)(Java Doc)
public URL[] getURLs()(Code)(Java Doc)
public static URLClassLoader newInstance(URL[] urls, ClassLoader parent)(Code)(Java Doc)
public static URLClassLoader newInstance(URL[] urls)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.