Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * Licensed to the Apache Software Foundation (ASF) under one or more
    * contributor license agreements.  See the NOTICE file distributed with
    * this work for additional information regarding copyright ownership.
    * The ASF licenses this file to You under the Apache License, Version 2.0
    * (the "License"); you may not use this file except in compliance with
    * the License.  You may obtain a copy of the License at
    * 
    *      http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  
  package org.apache.tomcat.util.modeler;
  
  
  import java.io.File;
  import java.net.URL;
  import java.util.HashMap;
  import java.util.List;
  
  
  
  /*
     Issues:
     - exceptions - too many "throws Exception"
     - double check the interfaces 
     - start removing the use of the experimental methods in tomcat, then remove
       the methods ( before 1.1 final )
     - is the security enough to prevent Registry beeing used to avoid the permission
      checks in the mbean server ?
  */ 

Registry for modeler MBeans. This is the main entry point into modeler. It provides methods to create and manipulate model mbeans and simplify their use. Starting with version 1.1, this is no longer a singleton and the static methods are strongly deprecated. In a container environment we can expect different applications to use different registries. This class is itself an mbean. IMPORTANT: public methods not marked with

Author(s):
Craig R. McClanahan
Costin Manolache
Since:
x.x are experimental or internal. Should not be used.
  
  public class Registry implements RegistryMBeanMBeanRegistration  {
  
      // Support for the factory methods
      
    
Will be used to isolate different apps and enhance security.
  
      private static HashMap perLoaderRegistries=null;

    
The registry instance created by our factory method the first time it is called.
  
      private static Registry registry = null;
  
      // Per registy fields
      
    
The MBeanServer instance that we will use to register management beans.
  
      private MBeanServer server = null;

    
The set of ManagedBean instances for the beans this registry knows about, keyed by name.
  
      private HashMap descriptors = new HashMap();

    
List of managed byeans, keyed by class name
 
     private HashMap descriptorsByClass = new HashMap();
 
     // map to avoid duplicated searching or loading descriptors 
     private HashMap searchedPaths=new HashMap();
     
     private Object guard;
 
     // Id - small ints to use array access. No reset on stop()
     // Used for notifications
     private Hashtable idDomains=new Hashtable();
     private Hashtable ids=new Hashtable();
 
     
     // ----------------------------------------------------------- Constructors
 
    
 
      public Registry() {
         super();
     }
 
     // -------------------- Static methods  --------------------
     // Factories
     
    
Factory method to create (if necessary) and return our Registry instance. Use this method to obtain a Registry - all other static methods are deprecated and shouldn't be used. The current version uses a static - future versions could use the thread class loader.

Parameters:
key Support for application isolation. If null, the context class loader will be used ( if setUseContextClassLoader is called ) or the default registry is returned.
guard Prevent access to the registry by untrusted components
Since:
1.1
 
     public synchronized static Registry getRegistry(Object keyObject guard) {
         Registry localRegistry;
         if!=null ) {
             ifkey==null ) 
                 key=Thread.currentThread().getContextClassLoader();
             ifkey != null ) {
                 localRegistry=(Registry).get(key);
                 iflocalRegistry == null ) {
                     localRegistry=new Registry();
 //                    localRegistry.key=key;
                     localRegistry.guard=guard;
                     .putkeylocalRegistry );
                     return localRegistry;
                 }
                 iflocalRegistry.guard != null &&
                         localRegistry.guard != guard ) {
                     return null// XXX Should I throw a permission ex ? 
                 }
                 return localRegistry;
             }
         }
 
         // static 
         if ( == null) {
              = new Registry();
         }
         if. != null &&
                 . != guard ) {
             return null;
         }
         return ();
     }
    
    
Allow containers to isolate apps. Can be called only once. It is highly recommended you call this method if using Registry in a container environment. The default is false for backward compatibility

Parameters:
enable
Since:
1.1
 
     public static void setUseContextClassLoaderboolean enable ) {
         ifenable ) {
             =new HashMap();
         }
     }
     
     // -------------------- Generic methods  --------------------
 
    
Lifecycle method - clean up the registry metadata. Called from resetMetadata().

Since:
1.1
  
     public void stop() {
          = new HashMap();
          = new HashMap();
         =new HashMap();
     }
    
    
Load an extended mlet file. The source can be an URL, File or InputStream. All mbeans will be instantiated, registered and the attributes will be set. The result is a list of ObjectNames.

Parameters:
source InputStream or URL of the file
cl ClassLoader to be used to load the mbeans, or null to use the default JMX mechanism ( i.e. all registered loaders )
Returns:
List of ObjectName for the loaded mbeans
Throws:
java.lang.Exception
Since:
1.1
  
     public List loadMBeansObject sourceClassLoader cl )
             throws Exception
     {
         return load("MbeansSource"sourcenull );
     }    


    
Load descriptors. The source can be a File or URL or InputStream for the descriptors file. In the case of File and URL, if the extension is ".ser" a serialized version will be loaded. This method should be used to explicitely load metadata - but this is not required in most cases. The registerComponent() method will find metadata in the same pacakge.

Parameters:
source
  
     public void loadMetadata(Object source ) throws Exception {
         loadDescriptorsnullsourcenull );
     }

    
Register a bean by creating a modeler mbean and adding it to the MBeanServer. If metadata is not loaded, we'll look up and read a file named "mbeans-descriptors.ser" or "mbeans-descriptors.xml" in the same package or parent. If the bean is an instance of DynamicMBean. it's metadata will be converted to a model mbean and we'll wrap it - so modeler services will be supported If the metadata is still not found, introspection will be used to extract it automatically. If an mbean is already registered under this name, it'll be first unregistered. If the component implements MBeanRegistration, the methods will be called. If the method has a method "setRegistry" that takes a RegistryMBean as parameter, it'll be called with the current registry.

Parameters:
bean Object to be registered
oname Name used for registration
type The type of the mbean, as declared in mbeans-descriptors. If null, the name of the class will be used. This can be used as a hint or by subclasses.
Since:
1.1
  
     public void registerComponent(Object beanString onameString type)
            throws Exception
     {
         registerComponent(beannew ObjectName(oname), type);        
     }    

    
Unregister a component. We'll first check if it is registered, and mask all errors. This is mostly a helper.

Parameters:
oname
Since:
1.1
  
     public void unregisterComponentString oname ) {
         try {
             unregisterComponent(new ObjectName(oname));
         } catch (MalformedObjectNameException e) {
         }
     }    
    

    
Invoke a operation on a list of mbeans. Can be used to implement lifecycle operations.

Parameters:
mbeans list of ObjectName on which we'll invoke the operations
operation Name of the operation ( init, start, stop, etc)
failFirst If false, exceptions will be ignored
Throws:
java.lang.Exception
Since:
1.1
 
     public void invokeList mbeansString operationboolean failFirst )
             throws Exception
     {
         ifmbeans==null ) {
             return;
         }
         Iterator itr=mbeans.iterator();
         while(itr.hasNext()) {
             Object current=itr.next();
             ObjectName oN=null;
             try {
                 ifcurrent instanceof ObjectName) {
                     oN=(ObjectName)current;
                 }
                 ifcurrent instanceof String ) {
                     oN=new ObjectName( (String)current );
                 }
                 ifoN==null ) {
                     continue;
                 }
                 ifgetMethodInfo(oNoperation) == null) {
                     continue;
                 }
                 getMBeanServer().invoke(oNoperation,
                         new Object[] {}, new String[] {});
 
             } catchException t ) {
                 iffailFirst ) throw t;
                 ..errorInvokingOperation(operationcurrent);
             }
         }
     }
 
     // -------------------- ID registry --------------------
 
    
Return an int ID for faster access. Will be used for notifications and for other operations we want to optimize.

Parameters:
domain Namespace
name Type of the notification
Returns:
An unique id for the domain:name combination
Since:
1.1
 
     public synchronized int getIdString domainString name) {
         ifdomain==null) {
             domain="";
         }
         Hashtable domainTable=(Hashtable).getdomain );
         ifdomainTable == null ) {
             domainTable=new Hashtable();
             .putdomaindomainTable); 
         }
         ifname==null ) {
             name="";
         }
         Integer i=(Integer)domainTable.get(name);
         
         ifi!= null ) {
             return i.intValue();
         }
 
         int id[]=(int []).getdomain );
         ifid == null ) {
             id=new int[1];
             .putdomainid); 
         }
         int code=id[0]++;
         domainTable.putnamenew Integercode ));
         return code;
     }
     
     // -------------------- Metadata   --------------------
     // methods from 1.0
 
    
Add a new bean metadata to the set of beans known to this registry. This is used by internal components.

Parameters:
bean The managed bean to be added
Since:
1.0
 
     public void addManagedBean(ManagedBean bean) {
         // XXX Use group + name
         .put(bean.getName(), bean);
         ifbean.getType() != null ) {
             .putbean.getType(), bean );
         }
     }


    
Find and return the managed bean definition for the specified bean name, if any; otherwise return null.

Parameters:
name Name of the managed bean to be returned. Since 1.1, both short names or the full name of the class can be used.
Since:
1.0
 
     public ManagedBean findManagedBean(String name) {
         // XXX Group ?? Use Group + Type
         ManagedBean mb=((ManagedBean.get(name));
         ifmb==null )
             mb=(ManagedBean).get(name);
         return mb;
     }
    
    
Return the set of bean names for all managed beans known to this registry.

Since:
1.0
 
     public String[] findManagedBeans() {
         return ((String[]) .keySet().toArray(new String[0]));
     }


    
Return the set of bean names for all managed beans known to this registry that belong to the specified group.

Parameters:
group Name of the group of interest, or null to select beans that do not belong to a group
Since:
1.0
 
     public String[] findManagedBeans(String group) {
 
         ArrayList results = new ArrayList();
         Iterator items = .values().iterator();
         while (items.hasNext()) {
             ManagedBean item = (ManagedBeanitems.next();
             if ((group == null) && (item.getGroup() == null)) {
                 results.add(item.getName());
             } else if (group.equals(item.getGroup())) {
                 results.add(item.getName());
             }
         }
         String values[] = new String[results.size()];
         return ((String[]) results.toArray(values));
 
     }


    
Remove an existing bean from the set of beans known to this registry.

Parameters:
bean The managed bean to be removed
Since:
1.0
 
     public void removeManagedBean(ManagedBean bean) {
        // TODO: change this to use group/name
         .remove(bean.getName());
         .removebean.getType());
     }
 
     // -------------------- Deprecated 1.0 methods  --------------------
     
    
Factory method to create (if necessary) and return our MBeanServer instance.

Deprecated:
Use the instance method
Since:
1.0
 
     public static MBeanServer getServer() {
         return Registry.getRegistry().getMBeanServer();
     }

    
Set the MBeanServer to be utilized for our registered management beans.

Deprecated:
Use the instance method
Parameters:
mbeanServer The new MBeanServer instance
Since:
1.0
 
     public static void setServer(MBeanServer mbeanServer) {
         Registry.getRegistry().setMBeanServer(mbeanServer);
     }

    
Load the registry from the XML input found in the specified input stream.

Deprecated:
use normal class method instead
Parameters:
stream InputStream containing the registry configuration information
Throws:
java.lang.Exception if any parsing or processing error occurs
Since:
1.0
 
     public static void loadRegistry(InputStream streamthrows Exception {
         Registry registry = getRegistry();
         registry.loadMetadata(stream);
     }

    
Get a "singelton" registry, or one per thread if setUseContextLoader was called

Deprecated:
Not enough info - use the method that takes CL and domain
Since:
1.0
  
     public synchronized static Registry getRegistry() {
         return getRegistry(nullnull);
     }    
 
     // -------------------- Helpers  --------------------
 
    
Get the type of an attribute of the object, from the metadata.

Parameters:
oname
attName
Returns:
null if metadata about the attribute is not found
Since:
1.1
 
     public String getTypeObjectName onameString attName )
     {
         String type=null;
         MBeanInfo info=null;
         try {
             info=.getMBeanInfo(oname);
         } catch (Exception e) {
             ..noMetadata(oname);
             return null;
         }
 
         MBeanAttributeInfo attInfo[]=info.getAttributes();
         forint i=0; i<attInfo.lengthi++ ) {
             ifattName.equals(attInfo[i].getName())) {
                 type=attInfo[i].getType();
                 return type;
             }
         }
         return null;
     }

    
Find the operation info for a method

Parameters:
oname
opName
Returns:
the operation info for the specified operation
  
     public MBeanOperationInfo getMethodInfoObjectName onameString opName )
     {
         String type=null;
         MBeanInfo info=null;
         try {
             info=.getMBeanInfo(oname);
         } catch (Exception e) {
             ..noMetadata(oname);
             return null;
         }
         MBeanOperationInfo attInfo[]=info.getOperations();
         forint i=0; i<attInfo.lengthi++ ) {
             ifopName.equals(attInfo[i].getName())) {
                 return attInfo[i];
             }
         }
         return null;
     }

    
Unregister a component. This is just a helper that avoids exceptions by checking if the mbean is already registered

Parameters:
oname
 
     public void unregisterComponentObjectName oname ) {
         try {
             ifgetMBeanServer().isRegistered(oname)) {
                 getMBeanServer().unregisterMBean(oname);
             }
         } catchThrowable t ) {
             ..errorUnregisteringMbean(onamet);
         }
     }

    
Factory method to create (if necessary) and return our MBeanServer instance.
 
     public synchronized MBeanServer getMBeanServer() {
         long t1=System.currentTimeMillis();
 
         if ( == null) {
             if( MBeanServerFactory.findMBeanServer(null).size() > 0 ) {
                 =(MBeanServer)MBeanServerFactory.findMBeanServer(null).get(0);
                 if..isDebugEnabled() ) {
                     ..debug("Using existing MBeanServer " + (System.currentTimeMillis() - t1 ));
                 }
             } else {
                 =MBeanServerFactory.createMBeanServer();
                 if..isDebugEnabled() ) {
                     ..debug("Creating MBeanServer"+ (System.currentTimeMillis() - t1 ));
                 }
             }
         }
         return ();
     }

    
Find or load metadata.
  
     public ManagedBean findManagedBean(Object beanClass beanClassString type)
         throws Exception
     {
         ifbean!=null && beanClass==null ) {
             beanClass=bean.getClass();
         }
         
         iftype==null ) {
             type=beanClass.getName();
         }
         
         // first look for existing descriptor
         ManagedBean managed = findManagedBean(type);
 
         // Search for a descriptor in the same package
         ifmanaged==null ) {
             // check package and parent packages
             if..isDebugEnabled() ) {
                 ..debug"Looking for descriptor ");
             }
             findDescriptorbeanClasstype );
 
             managed=findManagedBean(type);
         }
         
         ifbean instanceof DynamicMBean ) {
             if..isDebugEnabled() ) {
                 ..debug"Dynamic mbean support ");
             }
             // Dynamic mbean
             loadDescriptors("MbeansDescriptorsDynamicMBeanSource",
                     beantype);
 
             managed=findManagedBean(type);
         }
 
         // Still not found - use introspection
         ifmanaged==null ) {
             if..isDebugEnabled() ) {
                 ..debug"Introspecting ");
             }
 
             // introspection
             loadDescriptors("MbeansDescriptorsIntrospectionSource",
                     beanClasstype);
 
             managed=findManagedBean(type);
             ifmanaged==null ) {
                 ..noMetadata(type);
                 return null;
             }
             managed.setNametype );
             addManagedBean(managed);
         }
         return managed;
     }
    

    
EXPERIMENTAL Convert a string to object, based on type. Used by several components. We could provide some pluggability. It is here to keep things consistent and avoid duplication in other tasks

Parameters:
type Fully qualified class name of the resulting value
value String value to be converted
Returns:
Converted value
  
     public Object convertValue(String typeString value)
     {
         Object objValue=value;
         
         iftype==null || "java.lang.String".equalstype )) {
             // string is default
             objValue=value;
         } else if"javax.management.ObjectName".equalstype ) ||
                 "ObjectName".equalstype )) {
             try {
                 objValue=new ObjectNamevalue );
             } catch (MalformedObjectNameException e) {
                 return null;
             }
         } else if"java.lang.Integer".equalstype ) ||
                 "int".equalstype )) {
             objValue=new Integervalue );
         } else if"java.lang.Long".equalstype ) ||
                 "long".equalstype )) {
             objValue=new Longvalue );
         } else if"java.lang.Boolean".equalstype ) ||
                 "boolean".equalstype )) {
             objValue=new Booleanvalue );
         }
         return objValue;
     }
    
    
Experimental.

Deprecated:
bad interface, mixing of metadata and mbeans
Parameters:
sourceType
source
param
Returns:
List of descriptors
Throws:
java.lang.Exception
 
     public List loadString sourceTypeObject sourceString param)
         throws Exception
     {
         if..isTraceEnabled()) {
             ..trace("load " + source );
         }
         String location=null;
         String type=null;
         Object inputsource=null;
 
         ifsource instanceof DynamicMBean ) {
             sourceType="MbeansDescriptorsDynamicMBeanSource";
             inputsource=source;
         } else ifsource instanceof URL ) {
             URL url=(URL)source;
             location=url.toString();
             type=param;
             inputsource=url.openStream();
             ifsourceType == null ) {
                 sourceType = sourceTypeFromExt(location);
             }
         } else ifsource instanceof File ) {
             location=((File)source).getAbsolutePath();
             inputsource=new FileInputStream((File)source);            
             type=param;
             ifsourceType == null ) {
                 sourceType = sourceTypeFromExt(location);
             }
         } else ifsource instanceof InputStream ) {
             type=param;
             inputsource=source;
         } else ifsource instanceof Class ) {
             location=((Class)source).getName();
             type=param;
             inputsource=source;
             ifsourceType== null ) {
                 sourceType="MbeansDescriptorsIntrospectionSource";
             }
         }
         
         ifsourceType==null ) {
             sourceType="MbeansDescriptorsDOMSource";
         }
         ModelerSource ds=getModelerSource(sourceType);
         List mbeans=ds.loadDescriptors(thislocationtypeinputsource);
 
         return mbeans;
     }
 
     private String sourceTypeFromExtString s ) {
         ifs.endsWith".ser")) {
             return "MbeansDescriptorsSerSource";
         }
         else ifs.endsWith(".xml")) {
             return "MbeansDescriptorsDOMSource";
         }
         return null;
     }

    
Register a component XXX make it private

Parameters:
bean
oname
type
Throws:
java.lang.Exception
  
     public void registerComponent(Object beanObjectName onameString type)
            throws Exception
     {
         if..isDebugEnabled() ) {
             ..debug"Managed= "oname);
         }
 
         ifbean ==null ) {
             ..nullComponent(oname);
             return;
         }
 
         try {
             iftype==null ) {
                 type=bean.getClass().getName();
             }
 
             ManagedBean managed = findManagedBean(bean.getClass(), type);
 
             // The real mbean is created and registered
             DynamicMBean mbean = managed.createMBean(bean);
 
             if(  getMBeanServer().isRegisteredoname )) {
                 if..isDebugEnabled()) {
                     ..debug("Unregistering existing component " + oname );
                 }
                 getMBeanServer().unregisterMBeanoname );
             }
 
             getMBeanServer().registerMBeanmbeanoname);
         } catchException ex) {
             ..errorRegisteringMbean(onameex);
             throw ex;
         }
     }

    
Lookup the component descriptor in the package and in the parent packages.

Parameters:
packageName
 
     public void loadDescriptorsString packageNameClassLoader classLoader  ) {
         String res=packageName.replace'.''/');
 
         if..isTraceEnabled() ) {
             ..trace("Finding descriptor " + res );
         }
 
         if.getpackageName ) != null ) {
             return;
         }
         String descriptors=res + "/mbeans-descriptors.ser";
 
         URL dURL=classLoader.getResourcedescriptors );
 
         ifdURL == null ) {
             descriptors=res + "/mbeans-descriptors.xml";
             dURL=classLoader.getResourcedescriptors );
         }
         ifdURL == null ) {
             return;
         }
 
         if (..isDebugEnabled()) {
             ..debug"Found " + dURL);
         }
         .putpackageName,  dURL );
         try {
             ifdescriptors.endsWith(".xml" ))
                 loadDescriptors("MbeansDescriptorsDOMSource"dURLnull);
             else
                 loadDescriptors("MbeansDescriptorsSerSource"dURLnull);
             return;
         } catch(Exception ex ) {
             ..errorLoading(dURL);
         }
 
         return;
     }

    
Experimental. Will become private, some code may still use it

Deprecated:
Parameters:
sourceType
source
param
Throws:
java.lang.Exception
 
     public void loadDescriptorsString sourceTypeObject sourceString param)
         throws Exception
     {
         List mbeans=loadsourceTypesourceparam );
         ifmbeans == nullreturn;
 
         Iterator itr=mbeans.iterator();
         whileitr.hasNext() ) {
             Object mb=itr.next();
             ifmb instanceof ManagedBean) {
                 addManagedBean((ManagedBean)mb);
             }
         }
     }

    
Lookup the component descriptor in the package and in the parent packages.

Parameters:
beanClass
type
 
     private void findDescriptorClass beanClassString type ) {
         iftype==null ) {
             type=beanClass.getName();
         }
         ClassLoader classLoader=null;
         ifbeanClass!=null ) {
             classLoader=beanClass.getClassLoader();
         }
         ifclassLoader==null ) {
             classLoader=Thread.currentThread().getContextClassLoader();
         }
         ifclassLoader==null ) {
             classLoader=this.getClass().getClassLoader();
         }
         
         String className=type;
         String pkg=className;
         whilepkg.indexOf".") > 0 ) {
             int lastComp=pkg.lastIndexOf".");
             iflastComp <= 0 ) return;
             pkg=pkg.substring(0, lastComp);
             if.getpkg ) != null ) {
                 return;
             }
             loadDescriptors(pkgclassLoader);
         }
         return;
     }
 
     private ModelerSource getModelerSourceString type )
             throws Exception
     {
         iftype==null ) type="MbeansDescriptorsDOMSource";
         iftype.indexOf".") < 0 ) {
             type="org.apache.tomcat.util.modeler.modules." + type;
         }
 
         Class c=Class.forNametype );
         ModelerSource ds=(ModelerSource)c.newInstance();
         return ds;
     }
 
 
     // -------------------- Registration  --------------------
     
     public ObjectName preRegister(MBeanServer server,
                                   ObjectName namethrows Exception 
     {
         this.=server;
         return name;
     }
 
     public void postRegister(Boolean registrationDone) {
     }
 
     public void preDeregister() throws Exception {
     }
 
     public void postDeregister() {
     }
 
     
     
     
     // -------------------- DEPRECATED METHODS  --------------------
     // May still be used in tomcat 
     // Never part of an official release
     
    
Called by a registry or by the container to unload a loader

Parameters:
loader
 
     public void unregisterRegistry(ClassLoader loader ) {
         // XXX Cleanup ?
         .remove(loader);
     }
 
     public ManagedBean findManagedBean(Class beanClassString type)
         throws Exception
     {
         return findManagedBean(nullbeanClasstype);        
     }
    
    
Set the MBeanServer to be utilized for our registered management beans.

Parameters:
server The new MBeanServer instance
 
     public void setMBeanServerMBeanServer server ) {
         this.=server;
     }
 
     public void resetMetadata() {
         stop();
     }
    
Load the registry from the XML input found in the specified input stream.

Parameters:
source Source to be used to load. Can be an InputStream or URL.
Throws:
java.lang.Exception if any parsing or processing error occurs
 
     public void loadDescriptorsObject source )
             throws Exception
     {
         loadDescriptors("MbeansDescriptorsDOMSource"sourcenull );
     }

    

Deprecated:
- may still be used in code using pre-1.1 builds
 
     public void registerComponent(Object beanString domainString type,
                                   String name)
             throws Exception
     {
         StringBuffer sb=new StringBuffer();
         sb.appenddomain ).append(":");
         sb.appendname );
         String nameStr=sb.toString();
         ObjectName oname=new ObjectNamenameStr );
        registerComponent(beanonametype );
    }
    
    // should be removed
    public void unregisterComponentString domainString name ) {
        ObjectName onamenull;
        try {
            oname=new ObjectNamedomain + ":" + name );
            // XXX remove from our tables.
            getMBeanServer().unregisterMBeanoname );
        } catchThrowable t ) {
            ..errorUnregisteringMbean(onamet);
        }
    }
    

    
Load the registry from a cached .ser file. This is typically 2-3 times faster than parsing the XML.

Deprecated:
Loaded automatically or using a File or Url ending in .ser
Parameters:
source Source to be used to load. Can be an InputStream or URL.
Throws:
java.lang.Exception if any parsing or processing error occurs
    public void loadCachedDescriptorsObject source )
            throws Exception
    {
        loadDescriptors("MbeansDescriptorsSerSource"sourcenull );
    }
New to GrepCode? Check out our FAQ X