Author: markt Date: Tue Jan 31 11:29:44 2012 New Revision: 1238397 URL: http://svn.apache.org/viewvc?rev=1238397&view=rev Log: Deprecate unused code
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/Registry.java tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/ModelerSource.java Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/Registry.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/Registry.java?rev=1238397&r1=1238396&r2=1238397&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/Registry.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/Registry.java Tue Jan 31 11:29:44 2012 @@ -687,7 +687,7 @@ public class Registry implements Registr } ModelerSource ds=getModelerSource(sourceType); List<ObjectName> mbeans = - ds.loadDescriptors(this, location, type, inputsource); + ds.loadDescriptors(this, type, inputsource); return mbeans; } Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java?rev=1238397&r1=1238396&r2=1238397&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java Tue Jan 31 11:29:44 2012 @@ -68,12 +68,11 @@ public class MbeansDescriptorsDOMSource } @Override - public List<ObjectName> loadDescriptors( Registry registry, String location, + public List<ObjectName> loadDescriptors( Registry registry, String type, Object source) throws Exception { setRegistry(registry); - setLocation(location); setType(type); setSource(source); execute(); Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java?rev=1238397&r1=1238396&r2=1238397&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java Tue Jan 31 11:29:44 2012 @@ -38,9 +38,7 @@ public class MbeansDescriptorsDigesterSo LogFactory.getLog(MbeansDescriptorsDigesterSource.class); Registry registry; - String location; String type; - Object source; List<ObjectName> mbeans = new ArrayList<ObjectName>(); protected static volatile Digester digester = null; @@ -188,6 +186,11 @@ public class MbeansDescriptorsDigesterSo this.registry=reg; } + + /** + * @deprecated Unused. Will be removed in Tomcat 8.0.x + */ + @Deprecated public void setLocation( String loc ) { this.location=loc; } @@ -205,10 +208,9 @@ public class MbeansDescriptorsDigesterSo } @Override - public List<ObjectName> loadDescriptors( Registry registry, String location, - String type, Object source) throws Exception { + public List<ObjectName> loadDescriptors( Registry registry, String type, + Object source) throws Exception { setRegistry(registry); - setLocation(location); setType(type); setSource(source); execute(); Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java?rev=1238397&r1=1238396&r2=1238397&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java Tue Jan 31 11:29:44 2012 @@ -41,15 +41,17 @@ public class MbeansDescriptorsIntrospect private static final Log log = LogFactory.getLog(MbeansDescriptorsIntrospectionSource.class); Registry registry; - String location; String type; - Object source; List<ObjectName> mbeans = new ArrayList<ObjectName>(); public void setRegistry(Registry reg) { this.registry=reg; } + /** + * @deprecated Unused. Will be removed in Tomcat 8.0.x + */ + @Deprecated public void setLocation( String loc ) { this.location=loc; } @@ -67,10 +69,9 @@ public class MbeansDescriptorsIntrospect } @Override - public List<ObjectName> loadDescriptors( Registry registry, String location, - String type, Object source) throws Exception { + public List<ObjectName> loadDescriptors(Registry registry, String type, + Object source) throws Exception { setRegistry(registry); - setLocation(location); setType(type); setSource(source); execute(); Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java?rev=1238397&r1=1238396&r2=1238397&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java Tue Jan 31 11:29:44 2012 @@ -34,15 +34,17 @@ public class MbeansDescriptorsSerSource { private static final Log log = LogFactory.getLog(MbeansDescriptorsSerSource.class); Registry registry; - String location; String type; - Object source; List<ObjectName> mbeans=new ArrayList<ObjectName>(); public void setRegistry(Registry reg) { this.registry=reg; } + /** + * @deprecated Unused. Will be removed in Tomcat 8.0.x + */ + @Deprecated public void setLocation( String loc ) { this.location=loc; } @@ -60,10 +62,9 @@ public class MbeansDescriptorsSerSource } @Override - public List<ObjectName> loadDescriptors( Registry registry, String location, - String type, Object source) throws Exception { + public List<ObjectName> loadDescriptors( Registry registry, String type, + Object source) throws Exception { setRegistry(registry); - setLocation(location); setType(type); setSource(source); execute(); Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java?rev=1238397&r1=1238396&r2=1238397&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java Tue Jan 31 11:29:44 2012 @@ -110,16 +110,15 @@ public class MbeansSource extends Modele } @Override - public List<ObjectName> loadDescriptors(Registry registry, String location, - String type, Object source) throws Exception { + public List<ObjectName> loadDescriptors(Registry registry, String type, + Object source) throws Exception { setRegistry(registry); - setLocation(location); setType(type); setSource(source); execute(); return mbeans; } - + public void start() throws Exception { registry.invoke(mbeans, "start", false); } Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/ModelerSource.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/ModelerSource.java?rev=1238397&r1=1238396&r2=1238397&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/ModelerSource.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/modules/ModelerSource.java Tue Jan 31 11:29:44 2012 @@ -30,8 +30,9 @@ import org.apache.tomcat.util.modeler.Re /** Source for descriptor data. More sources can be added. * */ -public class ModelerSource { +public abstract class ModelerSource { protected Object source; + @Deprecated protected String location; /** Load data, returns a list of items. @@ -41,11 +42,14 @@ public class ModelerSource { * @param type * @param source Introspected object or some other source * @throws Exception - */ + * + * @deprecated Location parameter is unused. Will be removed in Tomcat + * 8.0.x + */ + @Deprecated public List<ObjectName> loadDescriptors( Registry registry, String location, String type, Object source) throws Exception { - // TODO - return null; + return loadDescriptors(registry, type, source); } /** Callback from the BaseMBean to notify that an attribute has changed. @@ -54,16 +58,27 @@ public class ModelerSource { * @param oname * @param name * @param value - */ - public void updateField( ObjectName oname, String name, + * @deprecated Unused - will be removed in Tomcat 8.0.x + */ + @Deprecated + public void updateField( ObjectName oname, String name, Object value ) { // nothing by default } + /** + * + * @deprecated Unused - will be removed in Tomcat 8.0.x + */ + @Deprecated public void store() { // nothing } + /** + * @deprecated Unused - will be removed in Tomcat 8.0.x + */ + @Deprecated protected InputStream getInputStream() throws IOException { if( source instanceof URL ) { URL url=(URL)source; @@ -81,4 +96,7 @@ public class ModelerSource { return null; } + + public abstract List<ObjectName> loadDescriptors(Registry registry, + String type, Object source) throws Exception; } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org