Methods Summary |
---|
public void | execute()
if( registry==null ) registry=Registry.getRegistry();
long t1=System.currentTimeMillis();
try {
InputStream stream=null;
if( source instanceof URL ) {
stream=((URL)source).openStream();
}
if( source instanceof InputStream ) {
stream=(InputStream)source;
}
if( stream==null ) {
throw new Exception( "Can't process "+ source);
}
ObjectInputStream ois=new ObjectInputStream(stream);
Thread.currentThread().setContextClassLoader(ManagedBean.class.getClassLoader());
Object obj=ois.readObject();
//log.info("Reading " + obj);
ManagedBean beans[]=(ManagedBean[])obj;
// after all are read without error
for( int i=0; i<beans.length; i++ ) {
mbeans.add(beans[i]);
}
} catch( Exception ex ) {
log.error( "Error reading descriptors " + source + " " + ex.toString(),
ex);
throw ex;
}
long t2=System.currentTimeMillis();
log.info( "Reading descriptors ( ser ) " + (t2-t1));
|
public java.util.List | loadDescriptors(org.apache.tomcat.util.modeler.Registry registry, java.lang.String location, java.lang.String type, java.lang.Object source)
setRegistry(registry);
setLocation(location);
setType(type);
setSource(source);
execute();
return mbeans;
|
public void | setLocation(java.lang.String loc)
this.location=loc;
|
public void | setRegistry(org.apache.tomcat.util.modeler.Registry reg)
this.registry=reg;
|
public void | setSource(java.lang.Object source)
this.source=source;
|
public void | setType(java.lang.String type)Used if a single component is loaded
this.type=type;
|