geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject cvs commit: incubator-geronimo/modules/system/src/java/org/apache/geronimo/system/serverinfo ServerInfo.java
Date Fri, 20 Feb 2004 17:25:12 GMT
jboynes     2004/02/20 09:25:12

  Modified:    modules/kernel/src/java/org/apache/geronimo/gbean
                        DynamicGAttributeInfo.java GAttributeInfo.java
               modules/kernel/src/java/org/apache/geronimo/kernel/config
                        Configuration.java
               modules/kernel/src/test/org/apache/geronimo/kernel
                        MockGBean.java
               modules/remoting/src/java/org/apache/geronimo/remoting/router
                        AbstractInterceptorRouter.java
               modules/remoting/src/java/org/apache/geronimo/remoting/transport
                        TransportLoader.java
               modules/system/src/java/org/apache/geronimo/system/serverinfo
                        ServerInfo.java
  Log:
  Cleanup GAttributeInfo usage
  
  Revision  Changes    Path
  1.2       +2 -2      incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/DynamicGAttributeInfo.java
  
  Index: DynamicGAttributeInfo.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/DynamicGAttributeInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DynamicGAttributeInfo.java	16 Jan 2004 23:31:21 -0000	1.1
  +++ DynamicGAttributeInfo.java	20 Feb 2004 17:25:11 -0000	1.2
  @@ -70,6 +70,6 @@
       }
   
       public DynamicGAttributeInfo(String name, boolean persistent, boolean readable, boolean
writable) {
  -        super(name, persistent, new Boolean(readable), new Boolean(writable), null, null);
  +        super(name, persistent, Boolean.valueOf(readable), Boolean.valueOf(writable), null,
null);
       }
   }
  
  
  
  1.4       +2 -10     incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/GAttributeInfo.java
  
  Index: GAttributeInfo.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/GAttributeInfo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- GAttributeInfo.java	16 Jan 2004 23:31:21 -0000	1.3
  +++ GAttributeInfo.java	20 Feb 2004 17:25:11 -0000	1.4
  @@ -95,20 +95,12 @@
        */
       private final String setterName;
   
  -    public GAttributeInfo(String name) {
  -        this(name, false, null, null, null, null);
  -    }
  -
  -    public GAttributeInfo(String name, String getterName, String setterName) {
  -        this(name, false, new Boolean(getterName != null), new Boolean(setterName != null),
getterName, setterName);
  -    }
  -
       public GAttributeInfo(String name, boolean persistent) {
           this(name, persistent, null, null, null, null);
       }
   
       public GAttributeInfo(String name, boolean persistent, String getterName, String setterName)
{
  -        this(name, persistent, new Boolean(getterName != null), new Boolean(setterName
!= null), getterName, setterName);
  +        this(name, persistent, Boolean.valueOf(getterName != null), Boolean.valueOf(setterName
!= null), getterName, setterName);
       }
   
       public GAttributeInfo(String name, boolean persistent, Boolean readable, Boolean writable,
String getterName, String setterName) {
  
  
  
  1.12      +14 -15    incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
  
  Index: Configuration.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Configuration.java	13 Feb 2004 23:21:07 -0000	1.11
  +++ Configuration.java	20 Feb 2004 17:25:11 -0000	1.12
  @@ -88,7 +88,6 @@
   import org.apache.geronimo.gbean.GBeanContext;
   import org.apache.geronimo.gbean.GBeanInfo;
   import org.apache.geronimo.gbean.GBeanInfoFactory;
  -import org.apache.geronimo.gbean.GConstructorInfo;
   import org.apache.geronimo.gbean.GReferenceInfo;
   import org.apache.geronimo.gbean.jmx.GBeanMBean;
   import org.apache.geronimo.gbean.jmx.GBeanMBeanContext;
  @@ -409,21 +408,21 @@
   
       static {
           GBeanInfoFactory infoFactory = new GBeanInfoFactory(Configuration.class);
  -        infoFactory.addAttribute(new GAttributeInfo("ID", true));
  -        infoFactory.addAttribute(new GAttributeInfo("ParentID", true));
  -        infoFactory.addAttribute(new GAttributeInfo("ClassPath", true));
  -        infoFactory.addAttribute(new GAttributeInfo("Dependencies", true));
  -        infoFactory.addAttribute(new GAttributeInfo("GBeanState", true));
  -        infoFactory.addAttribute(new GAttributeInfo("BaseURL"));
  -        infoFactory.addAttribute(new GAttributeInfo("ObjectName"));
  -        infoFactory.addAttribute(new GAttributeInfo("ClassLoader"));
  -        infoFactory.addAttribute(new GAttributeInfo("SavedState")); // @todo is this used?
  -        infoFactory.addReference(new GReferenceInfo("Parent", ConfigurationParent.class));
  -        infoFactory.addReference(new GReferenceInfo("Repositories", Repository.class));
  -        infoFactory.setConstructor(new GConstructorInfo(
  +        infoFactory.addAttribute("ID", true);
  +        infoFactory.addAttribute("ParentID", true);
  +        infoFactory.addAttribute("ClassPath", true);
  +        infoFactory.addAttribute("Dependencies", true);
  +        infoFactory.addAttribute("GBeanState", true);
  +        infoFactory.addAttribute("BaseURL", false);
  +        infoFactory.addAttribute("ObjectName", false);
  +        infoFactory.addAttribute("ClassLoader", false);
  +        infoFactory.addAttribute("SavedState", false); // @todo is this used?
  +        infoFactory.addReference("Parent", ConfigurationParent.class);
  +        infoFactory.addReference("Repositories", Repository.class);
  +        infoFactory.setConstructor(
                   new String[]{"ID", "ParentID", "Parent", "ClassPath", "GBeanState", "Repositories",
"Dependencies"},
                   new Class[]{URI.class, URI.class, ConfigurationParent.class, List.class,
byte[].class, Collection.class, List.class}
  -        ));
  +        );
           GBEAN_INFO = infoFactory.getBeanInfo();
       }
   
  
  
  
  1.11      +17 -15    incubator-geronimo/modules/kernel/src/test/org/apache/geronimo/kernel/MockGBean.java
  
  Index: MockGBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/test/org/apache/geronimo/kernel/MockGBean.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- MockGBean.java	25 Jan 2004 21:07:04 -0000	1.10
  +++ MockGBean.java	20 Feb 2004 17:25:12 -0000	1.11
  @@ -56,15 +56,14 @@
   package org.apache.geronimo.kernel;
   
   import java.util.Collection;
  -import java.util.Iterator;
   import java.util.Collections;
  +import java.util.Iterator;
   
  -import org.apache.geronimo.gbean.GAttributeInfo;
   import org.apache.geronimo.gbean.GBeanInfo;
   import org.apache.geronimo.gbean.GBeanInfoFactory;
   import org.apache.geronimo.gbean.GConstructorInfo;
  -import org.apache.geronimo.gbean.GReferenceInfo;
   import org.apache.geronimo.gbean.GOperationInfo;
  +import org.apache.geronimo.gbean.GReferenceInfo;
   
   /**
    *
  @@ -88,18 +87,21 @@
   
       static {
           GBeanInfoFactory infoFactory = new GBeanInfoFactory("MockGBean", MockGBean.class.getName());
  -        infoFactory.addAttribute(new GAttributeInfo("Name", true));
  -        infoFactory.addAttribute(new GAttributeInfo("Value", true));
  -        infoFactory.addAttribute(new GAttributeInfo("FinalInt", true));
  -        infoFactory.addAttribute(new GAttributeInfo("EndpointMutableInt"));
  -        infoFactory.addOperation(new GOperationInfo("checkResource", new String[]{"java.lang.String"}));
  -        infoFactory.addOperation(new GOperationInfo("checkEndpoint"));
  -        infoFactory.addOperation(new GOperationInfo("checkEndpointCollection"));
  -        infoFactory.addOperation(new GOperationInfo("doSomething", new String[]{"java.lang.String"}));
  +        infoFactory.addAttribute("Name", true);
  +        infoFactory.addAttribute("Value", true);
  +        infoFactory.addAttribute("FinalInt", true);
  +        infoFactory.addAttribute("EndpointMutableInt", false);
  +        infoFactory.addOperation("checkResource", new Class[] {String.class});
  +        infoFactory.addOperation("checkEndpoint");
  +        infoFactory.addOperation("checkEndpointCollection");
  +        infoFactory.addOperation("doSomething", new Class[] {String.class});
           infoFactory.addInterface(MockEndpoint.class, new String[] {"MutableInt"});
  -        infoFactory.addReference(new GReferenceInfo("MockEndpoint", MockEndpoint.class.getName()));
  -        infoFactory.addReference(new GReferenceInfo("EndpointCollection", MockEndpoint.class.getName()));
  -        infoFactory.setConstructor(new GConstructorInfo(new String[]{"Name", "FinalInt"},
new Class[]{String.class, Integer.TYPE}));
  +        infoFactory.addReference("MockEndpoint", MockEndpoint.class);
  +        infoFactory.addReference("EndpointCollection", MockEndpoint.class);
  +        infoFactory.setConstructor(
  +                new String[]{"Name", "FinalInt"},
  +                new Class[]{String.class, Integer.TYPE}
  +        );
           GBEAN_INFO = infoFactory.getBeanInfo();
       }
   
  
  
  
  1.6       +6 -5      incubator-geronimo/modules/remoting/src/java/org/apache/geronimo/remoting/router/AbstractInterceptorRouter.java
  
  Index: AbstractInterceptorRouter.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/remoting/src/java/org/apache/geronimo/remoting/router/AbstractInterceptorRouter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractInterceptorRouter.java	25 Jan 2004 21:07:04 -0000	1.5
  +++ AbstractInterceptorRouter.java	20 Feb 2004 17:25:12 -0000	1.6
  @@ -67,6 +67,7 @@
   import org.apache.geronimo.gbean.GBeanInfo;
   import org.apache.geronimo.gbean.GReferenceInfo;
   import org.apache.geronimo.gbean.GOperationInfo;
  +import org.apache.geronimo.gbean.GBeanInfoFactory;
   import org.apache.geronimo.gbean.jmx.GBeanMBeanContext;
   import org.apache.geronimo.remoting.InvocationSupport;
   import org.apache.geronimo.remoting.MarshalledObject;
  @@ -162,10 +163,10 @@
       public static final GBeanInfo GBEAN_INFO;
   
       static {
  -        Set operations = new HashSet();
  -        operations.add(new GOperationInfo("sendRequest", new String[]{"java.net.URI", "org.apache.geronimo.remoting.transport.Msg"}));
  -        operations.add(new GOperationInfo("sendDatagram", new String[]{"java.net.URI",
"org.apache.geronimo.remoting.transport.Msg"}));
  -        GBEAN_INFO = new GBeanInfo(AbstractInterceptorRouter.class.getName(), null, null,
operations, null, null);
  +        GBeanInfoFactory infoFactory = new GBeanInfoFactory(AbstractInterceptorRouter.class);
  +        infoFactory.addOperation("sendRequest", new Class[] {URI.class, Msg.class});
  +        infoFactory.addOperation("sendDatagram", new Class[] {URI.class, Msg.class});
  +        GBEAN_INFO = infoFactory.getBeanInfo();
       }
   
       public static GBeanInfo getGBeanInfo() {
  
  
  
  1.7       +7 -7      incubator-geronimo/modules/remoting/src/java/org/apache/geronimo/remoting/transport/TransportLoader.java
  
  Index: TransportLoader.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/remoting/src/java/org/apache/geronimo/remoting/transport/TransportLoader.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TransportLoader.java	25 Jan 2004 22:15:51 -0000	1.6
  +++ TransportLoader.java	20 Feb 2004 17:25:12 -0000	1.7
  @@ -64,6 +64,7 @@
   import org.apache.geronimo.gbean.GBeanContext;
   import org.apache.geronimo.gbean.GBeanInfo;
   import org.apache.geronimo.gbean.GReferenceInfo;
  +import org.apache.geronimo.gbean.GBeanInfoFactory;
   import org.apache.geronimo.remoting.router.Router;
   
   /**
  @@ -122,12 +123,11 @@
       public static final GBeanInfo GBEAN_INFO;
   
       static {
  -        Set attributes = new HashSet();
  -        attributes.add(new GAttributeInfo("ClientConnectURI"));
  -        attributes.add(new GAttributeInfo("BindURI", true));
  -        Set references = new HashSet();
  -        references.add(new GReferenceInfo("Router", "org.apache.geronimo.remoting.router.Router"));
  -        GBEAN_INFO = new GBeanInfo(TransportLoader.class.getName(), attributes, null, null,
references, null);
  +        GBeanInfoFactory infoFactory = new GBeanInfoFactory(TransportLoader.class);
  +        infoFactory.addAttribute("ClientConnectURI", false);
  +        infoFactory.addAttribute("BindURI", true);
  +        infoFactory.addReference("Router", Router.class);
  +        GBEAN_INFO = infoFactory.getBeanInfo();
       }
   
       public static GBeanInfo getGBeanInfo() {
  
  
  
  1.4       +9 -11     incubator-geronimo/modules/system/src/java/org/apache/geronimo/system/serverinfo/ServerInfo.java
  
  Index: ServerInfo.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/system/src/java/org/apache/geronimo/system/serverinfo/ServerInfo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ServerInfo.java	18 Feb 2004 18:02:57 -0000	1.3
  +++ ServerInfo.java	20 Feb 2004 17:25:12 -0000	1.4
  @@ -61,11 +61,9 @@
   import java.net.URI;
   import java.net.URL;
   
  -import org.apache.geronimo.gbean.GAttributeInfo;
   import org.apache.geronimo.gbean.GBeanInfo;
   import org.apache.geronimo.gbean.GBeanInfoFactory;
   import org.apache.geronimo.gbean.GConstructorInfo;
  -import org.apache.geronimo.gbean.GOperationInfo;
   
   /**
    * @version $Revision$ $Date$
  @@ -106,7 +104,7 @@
               baseURI = base.toURI();
           }
           if (!base.isDirectory()) {
  -            throw new IllegalArgumentException("Base directory is not a directory: "+baseDirectory);
  +            throw new IllegalArgumentException("Base directory is not a directory: " +
baseDirectory);
           }
       }
   
  @@ -146,13 +144,13 @@
           infoFactory.setConstructor(new GConstructorInfo(
                   new String[]{"BaseDirectory"},
                   new Class[]{String.class}));
  -        infoFactory.addAttribute(new GAttributeInfo("BaseDirectory", true));
  -        infoFactory.addAttribute(new GAttributeInfo("Version"));
  -        infoFactory.addAttribute(new GAttributeInfo("BuildDate"));
  -        infoFactory.addAttribute(new GAttributeInfo("BuildTime"));
  -        infoFactory.addAttribute(new GAttributeInfo("Copyright"));
  -        infoFactory.addOperation(new GOperationInfo("resolvePath", new String[]{"java.lang.String"}));
  -        infoFactory.addOperation(new GOperationInfo("resolve", new Class[]{URI.class}));
  +        infoFactory.addAttribute("BaseDirectory", true);
  +        infoFactory.addAttribute("Version", false);
  +        infoFactory.addAttribute("BuildDate", false);
  +        infoFactory.addAttribute("BuildTime", false);
  +        infoFactory.addAttribute("Copyright", false);
  +        infoFactory.addOperation("resolvePath", new Class[]{String.class});
  +        infoFactory.addOperation("resolve", new Class[]{URI.class});
           GBEAN_INFO = infoFactory.getBeanInfo();
       }
   
  
  
  

Mime
View raw message