avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/subscription AbstractSubscriber.java
Date Tue, 29 Jan 2002 14:50:34 GMT
hammant     02/01/29 06:50:34

  Modified:    src/java/org/apache/avalon/cornerstone/blocks/transport/publishing
                        AbstractPublisher.java RmiPublisher.java
               src/java/org/apache/avalon/cornerstone/blocks/transport/subscription
                        AbstractSubscriber.java
  Log:
  Altrmi with list() capability
  
  Revision  Changes    Path
  1.9       +19 -1     jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/publishing/AbstractPublisher.java
  
  Index: AbstractPublisher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/publishing/AbstractPublisher.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AbstractPublisher.java	26 Jan 2002 14:26:28 -0000	1.8
  +++ AbstractPublisher.java	29 Jan 2002 14:50:34 -0000	1.9
  @@ -15,8 +15,10 @@
   import org.apache.commons.altrmi.server.AltrmiServer;
   import org.apache.commons.altrmi.server.ClassRetriever;
   import org.apache.commons.altrmi.server.AltrmiAuthenticator;
  +import org.apache.commons.altrmi.server.MethodInvocationHandler;
   import org.apache.commons.altrmi.server.impl.classretrievers.JarFileClassRetriever;
   import org.apache.commons.altrmi.server.impl.classretrievers.NoClassRetriever;
  +import org.apache.commons.altrmi.common.MethodRequest;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.activity.Startable;
   import org.apache.avalon.framework.activity.Initializable;
  @@ -45,7 +47,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.8 $
  + * @version $Revision: 1.9 $
    */
   public abstract class AbstractPublisher extends AbstractLogEnabled
           implements AltrmiPublisher, Startable, Composable, Contextualizable,
  @@ -281,4 +283,20 @@
       {
           m_AltrmiServer.stop();
       }
  +
  +    /**
  +     * Method getMethodInvocationHandler
  +     *
  +     *
  +     * @param request
  +     * @param s
  +     *
  +     * @return
  +     *
  +     */
  +    public MethodInvocationHandler getMethodInvocationHandler(MethodRequest request, String
s)
  +    {
  +        return m_AltrmiServer.getMethodInvocationHandler(request, s);
  +    }
  +
   }
  
  
  
  1.4       +40 -39    jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/publishing/RmiPublisher.java
  
  Index: RmiPublisher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/publishing/RmiPublisher.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RmiPublisher.java	16 Jan 2002 13:30:03 -0000	1.3
  +++ RmiPublisher.java	29 Jan 2002 14:50:34 -0000	1.4
  @@ -13,6 +13,8 @@
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.commons.altrmi.server.impl.rmi.RmiServer;
  +import org.apache.commons.altrmi.server.MethodInvocationHandler;
  +import org.apache.commons.altrmi.common.MethodRequest;
   
   
   /**
  @@ -20,45 +22,44 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
  -
  -public class RmiPublisher
  -   extends AbstractPublisher
  +public class RmiPublisher extends AbstractPublisher
   {
  -   private String mHost;
  -   private int    mPort;
   
  -   /**
  -    * Pass the <code>Configuration</code> to the <code>Configurable</code>
  -    * class. This method must always be called after the constructor
  -    * and before any other method.
  -    *
  -    * @param configuration the class configurations.
  -    */
  -
  -   public void configure (Configuration configuration)
  -      throws ConfigurationException
  -   {
  -      super.configure(configuration);
  -
  -      mPort = configuration.getChild("port").getValueAsInteger();
  -      mHost = configuration.getChild("host").getValue();
  -   }
  -
  -   /**
  -    * Initialialize the component. Initialization includes
  -    * allocating any resources required throughout the
  -    * components lifecycle.
  -    *
  -    * @exception Exception if an error occurs
  -    */
  -
  -   public void initialize ()
  -      throws Exception
  -   {
  -      m_AltrmiServer = new RmiServer(mHost, mPort);
  -
  -      super.initialize();
  -   }
  -}
  \ No newline at end of file
  +    private String mHost;
  +    private int mPort;
  +
  +    /**
  +     * Pass the <code>Configuration</code> to the <code>Configurable</code>
  +     * class. This method must always be called after the constructor
  +     * and before any other method.
  +     *
  +     * @param configuration the class configurations.
  +     */
  +    public void configure(Configuration configuration) throws ConfigurationException
  +    {
  +
  +        super.configure(configuration);
  +
  +        mPort = configuration.getChild("port").getValueAsInteger();
  +        mHost = configuration.getChild("host").getValue();
  +    }
  +
  +    /**
  +     * Initialialize the component. Initialization includes
  +     * allocating any resources required throughout the
  +     * components lifecycle.
  +     *
  +     * @exception Exception if an error occurs
  +     */
  +    public void initialize() throws Exception
  +    {
  +
  +        m_AltrmiServer = new RmiServer(mHost, mPort);
  +
  +        super.initialize();
  +    }
  +
  +
  +}
  
  
  
  1.8       +5 -1      jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/subscription/AbstractSubscriber.java
  
  Index: AbstractSubscriber.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/subscription/AbstractSubscriber.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AbstractSubscriber.java	21 Jan 2002 11:24:56 -0000	1.7
  +++ AbstractSubscriber.java	29 Jan 2002 14:50:34 -0000	1.8
  @@ -30,7 +30,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
    */
   public abstract class AbstractSubscriber extends AbstractLogEnabled
           implements AltrmiInterfaceLookup, Configurable, Initializable, Block {
  @@ -119,5 +119,9 @@
        */
       public void close() {
           mAltrmiFactory.close();
  +    }
  +
  +    public String[] list() {
  +        return mAltrmiFactory.list();
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message