You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2004/09/08 06:50:08 UTC

cvs commit: jakarta-commons/jelly/jelly-tags/jmx/src/java/org/apache/commons/jelly/tags/jmx ServerTag.java RegisterTag.java OperationTag.java

dion        2004/09/07 21:50:08

  Modified:    jelly/jelly-tags/jmx/src/java/org/apache/commons/jelly/tags/jmx
                        ServerTag.java RegisterTag.java OperationTag.java
  Log:
  detab
  
  Revision  Changes    Path
  1.4       +18 -18    jakarta-commons/jelly/jelly-tags/jmx/src/java/org/apache/commons/jelly/tags/jmx/ServerTag.java
  
  Index: ServerTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jmx/src/java/org/apache/commons/jelly/tags/jmx/ServerTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ServerTag.java	25 Feb 2004 01:31:56 -0000	1.3
  +++ ServerTag.java	8 Sep 2004 04:50:08 -0000	1.4
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed 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.
  @@ -26,10 +26,10 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  -/** 
  +/**
    * Binds a Java bean to the given named Jelly tag so that the attributes of
    * the tag set the bean properties..
  - * 
  + *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision$
    */
  @@ -39,24 +39,24 @@
       private static final Log log = LogFactory.getLog(ServerTag.class);
   
       private MBeanServer server;
  -    
  +
       public ServerTag() {
       }
  -    
  +
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
  -        
  +
           // force the creation of a Server
           MBeanServer server = getServer();
   
  -        // allow children to register beans        
  +        // allow children to register beans
           invokeBody(output);
  -	}
  +    }
  +
   
  -    
       // Properties
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       /**
        * @return MBeanServer
        */
  @@ -75,13 +75,13 @@
           this.server = server;
       }
   
  -    
  -    
  +
  +
       // Implementation methods
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       /**
        * Factory method to lazily create an MBeanServer if none is supplied
  -     * 
  +     *
        * @return MBeanServer
        */
       protected MBeanServer createServer() {
  
  
  
  1.4       +23 -23    jakarta-commons/jelly/jelly-tags/jmx/src/java/org/apache/commons/jelly/tags/jmx/RegisterTag.java
  
  Index: RegisterTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jmx/src/java/org/apache/commons/jelly/tags/jmx/RegisterTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RegisterTag.java	25 Feb 2004 01:31:56 -0000	1.3
  +++ RegisterTag.java	8 Sep 2004 04:50:08 -0000	1.4
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed 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.
  @@ -30,9 +30,9 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  -/** 
  +/**
    * Registers a JavaBean or JMX MBean with a server..
  - * 
  + *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision$
    */
  @@ -41,26 +41,26 @@
       /** The Log to which logging calls will be made. */
       private static final Log log = LogFactory.getLog(RegisterTag.class);
   
  -    private ObjectName name;    
  +    private ObjectName name;
       private MBeanServer server;
   
       public RegisterTag() {
       }
   
  -    
  +
       // CollectionTag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void addItem(Object bean) throws JellyTagException {
           try {
  -            register(server, bean);            
  -        } 
  +            register(server, bean);
  +        }
           catch (Exception e) {
  -            throw new JellyTagException("Failed to register bean: " + bean, e);                
  -        } 
  +            throw new JellyTagException("Failed to register bean: " + bean, e);
  +        }
       }
  -    
  +
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
           if (name == null) {
               throw new MissingAttributeException("name");
  @@ -73,13 +73,13 @@
               server = serverTag.getServer();
           }
           invokeBody(output);
  -	}
  +    }
  +
   
  -    
       // Properties
  -    //-------------------------------------------------------------------------                    
  -    
  -   
  +    //-------------------------------------------------------------------------
  +
  +
       /**
        * @return ObjectName
        */
  @@ -105,7 +105,7 @@
       /**
        * Sets the MBeanServer. If this attribute is not supplied then the parent &lt;server&gt; tag
        * is used to get the MBeanServer instance to use.
  -     * 
  +     *
        * @param server The MBeanServer to register the mbeans with.
        */
       public void setServer(MBeanServer server) {
  @@ -113,8 +113,8 @@
       }
   
       // Implementation methods
  -    //-------------------------------------------------------------------------   
  -                     
  +    //-------------------------------------------------------------------------
  +
       /**
        * Registers the given bean with the MBeanServer
        */
  
  
  
  1.4       +24 -24    jakarta-commons/jelly/jelly-tags/jmx/src/java/org/apache/commons/jelly/tags/jmx/OperationTag.java
  
  Index: OperationTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jmx/src/java/org/apache/commons/jelly/tags/jmx/OperationTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OperationTag.java	25 Feb 2004 01:31:56 -0000	1.3
  +++ OperationTag.java	8 Sep 2004 04:50:08 -0000	1.4
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed 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.
  @@ -29,9 +29,9 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  -/** 
  +/**
    * Registers a JavaBean or JMX MBean with a server..
  - * 
  + *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision$
    */
  @@ -41,30 +41,30 @@
       private static final Log log = LogFactory.getLog(OperationTag.class);
   
       private String name;
  -    private Object arguments;    
  +    private Object arguments;
       private List argList = null;
       private String[] parameters;
   
       public OperationTag() {
       }
   
  -    
  +
       // CollectionTag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void addItem(Object value) {
           if (argList == null) {
               argList = new ArrayList();
           }
           argList.add(value);
       }
  -    
  +
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
           if (name == null) {
               throw new MissingAttributeException("name");
           }
  -        
  +
           RegisterTag registerTag = (RegisterTag) findAncestorWithClass(RegisterTag.class);
           if (registerTag == null) {
               throw new JellyTagException("This class must be nested inside a <register> tag");
  @@ -74,24 +74,24 @@
               invokeBody(output);
   
               ObjectName objectName = registerTag.getName();
  -            registerTag.getServer().invoke(objectName, getName(), getArgumentArray(), getParameters()); 
  -        } 
  +            registerTag.getServer().invoke(objectName, getName(), getArgumentArray(), getParameters());
  +        }
           catch (JellyTagException e) {
  -            throw e;                
  -        } 
  +            throw e;
  +        }
           catch (Exception e) {
  -            throw new JellyTagException("Failed to register bean: " + bean, e);                
  -        } 
  +            throw new JellyTagException("Failed to register bean: " + bean, e);
  +        }
           finally {
               argList = null;
           }
  -	}
  +    }
  +
   
  -    
       // Properties
  -    //-------------------------------------------------------------------------                    
  -    
  -   
  +    //-------------------------------------------------------------------------
  +
  +
   
       /**
        * @return Object
  @@ -140,7 +140,7 @@
   
       // Implementation methods
       //-------------------------------------------------------------------------
  -    
  +
       /**
        * Converts the argument property into an Object[] or converts the list of
        * added argument objects (added via child tags) to an Object[] or
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org