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 RmiSubscriber.java SocketObjectStreamSubscriber.java
Date Wed, 16 Jan 2002 13:30:04 GMT
hammant     02/01/16 05:30:04

  Modified:    src/java/org/apache/avalon/cornerstone/blocks/transport/autopublishing
                        AutoPublisher.java PublicationInfo.java
               src/java/org/apache/avalon/cornerstone/blocks/transport/publishing
                        AbstractPublisher.java RmiPublisher.java
                        RmiPublisher.xinfo
                        SocketObjectStreamConnectionHandler.java
                        SocketObjectStreamPublisher.java
                        SocketObjectStreamPublisher.xinfo
               src/java/org/apache/avalon/cornerstone/blocks/transport/subscription
                        AbstractSubscriber.java RmiSubscriber.java
                        SocketObjectStreamSubscriber.java
  Added:       src/java/org/apache/avalon/cornerstone/blocks/transport/authentication
                        DefaultAuthenticator.java
                        DefaultAuthenticator.xinfo
  Log:
  Use Default Authenicator for AltRMI & reformat to cornerstone style
  
  Revision  Changes    Path
  1.1                  jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/authentication/DefaultAuthenticator.java
  
  Index: DefaultAuthenticator.java
  ===================================================================
  
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.avalon.cornerstone.blocks.transport.authentication;
  
  
  
  import org.apache.avalon.framework.logger.AbstractLogEnabled;
  import org.apache.avalon.framework.activity.Initializable;
  import org.apache.avalon.phoenix.Block;
  import org.apache.commons.altrmi.server.AltrmiAuthenticator;
  import org.apache.commons.altrmi.common.AltrmiAuthentication;
  import org.apache.commons.altrmi.common.AltrmiAuthenticationException;
  
  
  /**
   * Class DefaultAuthenticator
   *
   *
   * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
   * @version $Revision: 1.1 $
   */
  public class DefaultAuthenticator extends AbstractLogEnabled
          implements AltrmiAuthenticator, Initializable, Block
  {
  
      protected AltrmiAuthenticator mAltrmiAuthenticator;
  
      /**
       * Initialialize the component. Initialization includes
       * allocating any resources required throughout the
       * components lifecycle.
       *
       * @exception Exception if an error occurs
       */
      public void initialize() throws Exception
      {
          mAltrmiAuthenticator = new org.apache.commons.altrmi.server.impl.DefaultAuthenticator();
      }
  
      /**
       * Method checkAuthority
       *
       *
       * @param authentication
       * @param publishedName
       *
       * @return
       *
       * @throws AltrmiAuthenticationException
       *
       */
      public Long checkAuthority(AltrmiAuthentication authentication, String publishedName)
              throws AltrmiAuthenticationException
      {
          return mAltrmiAuthenticator.checkAuthority(authentication, publishedName);
      }
  
      /**
       * Method getTextToSign
       *
       *
       * @return
       *
       */
      public String getTextToSign()
      {
          return mAltrmiAuthenticator.getTextToSign();
      }
  }
  
  
  
  1.1                  jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/authentication/DefaultAuthenticator.xinfo
  
  Index: DefaultAuthenticator.xinfo
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE blockinfo PUBLIC "-//PHOENIX/Block Info DTD Version 1.0//EN"
                    "http://jakarta.apache.org/phoenix/blockinfo_1_0.dtd">
  
  <blockinfo>
  
    <!-- section to describe block -->
    <block>
      <version>1.0</version>
    </block>
  
    <!-- services that are offered by this block -->
    <services>
      <service name="org.apache.commons.altrmi.server.AltrmiAuthenticator" version="1.0" />
    </services>
  
    <!-- services that are required by this block -->
    <dependencies>
    </dependencies>
  
  
  </blockinfo>
  
  
  
  1.4       +108 -122  jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/autopublishing/AutoPublisher.java
  
  Index: AutoPublisher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/autopublishing/AutoPublisher.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AutoPublisher.java	14 Jan 2002 13:11:37 -0000	1.3
  +++ AutoPublisher.java	16 Jan 2002 13:30:03 -0000	1.4
  @@ -15,6 +15,7 @@
   import java.util.Iterator;
   import java.util.List;
   import java.util.Map;
  +
   import org.apache.avalon.framework.CascadingRuntimeException;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
  @@ -33,128 +34,113 @@
    *
    *
    * @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 AutoPublisher
  -   implements Configurable, BlockListener
  +public class AutoPublisher implements Configurable, BlockListener
   {
  -   private String          m_publisherName;
  -   private AltrmiPublisher m_altrmiPublisher;
  -   private Map             m_publications;
  -   private List            m_queue;
  -
  -   /**
  -    * Method configure
  -    *
  -    *
  -    * @param configuration
  -    *
  -    * @throws ConfigurationException
  -    *
  -    */
  -
  -   public void configure (final Configuration configuration)
  -      throws ConfigurationException
  -   {
  -      m_publisherName =
  -         configuration.getChild("publisher").getValue("altrmification");
  -      m_publications  = new HashMap();
  -
  -      final Configuration[] confs = configuration.getChildren("publish");
  -
  -      for (int i = 0; i < confs.length; i++)
  -      {
  -         final Configuration conf               = confs [i];
  -         final String        blockName          = conf.getAttribute("block");
  -         final String        publishAsName      =
  -            conf.getAttribute("publishAsName");
  -         final String        interfaceToPublish =
  -            conf.getAttribute("interfaceToPublish");
  -
  -         m_publications.put(blockName,
  -                            new PublicationInfo(publishAsName,
  -                                                interfaceToPublish));
  -      }
  -
  -      m_queue = new ArrayList();
  -   }
  -
  -   /**
  -    * Method blockAdded
  -    *
  -    *
  -    * @param event
  -    *
  -    */
  -
  -   public void blockAdded (final BlockEvent event)
  -   {
  -      System.out.println("Block " + event.getName() + " added");
  -
  -      if (m_publisherName.equals(event.getName()))
  -      {
  -         m_altrmiPublisher = ( AltrmiPublisher ) event.getBlock();
  -      }
  -
  -      if (m_publications.containsKey(event.getName()))
  -      {
  -         final Block     block     = event.getBlock();
  -         final String    blockName = event.getName();
  -         PublicationInfo pi        =
  -            ( PublicationInfo ) m_publications.get(event.getName());
  -
  -         try
  -         {
  -            m_altrmiPublisher.publish(
  -               block, pi.getPublishAsName(),
  -               Class.forName(pi.getInterfaceToPublish()));
  -         }
  -         catch (AltrmiPublicationException e)
  -         {
  -            throw new CascadingRuntimeException(
  -               "Some problem auto-publishing", e);
  -         }
  -         catch (ClassNotFoundException e)
  -         {
  -            throw new CascadingRuntimeException(
  -               "Interface specifies in config.xml ('interfaceToPublish' attribte) not found",
  -               e);
  -         }
  -      }
  -   }
  -
  -   /**
  -    * Method blockRemoved
  -    *
  -    *
  -    * @param event
  -    *
  -    */
  -
  -   public void blockRemoved (final BlockEvent event)
  -   {
  -      System.out.println("Block " + event.getName() + " removed");
  -
  -      if (m_publications.containsKey(event.getName()))
  -      {
  -         final Block     block     = event.getBlock();
  -         final String    blockName = event.getName();
  -         PublicationInfo pi        =
  -            ( PublicationInfo ) m_publications.get(event.getName());
  -
  -         try
  -         {
  -            m_altrmiPublisher.unPublish(block, pi.getPublishAsName());
  -         }
  -         catch (AltrmiPublicationException e)
  -         {
  -            throw new CascadingRuntimeException(
  -               "Some problem un-auto-publishing", e);
  -         }
  -      }
  -   }
  -}
   
  -
  -/*------ Formatted by Jindent 3.24 Basic 1.0 --- http://www.jindent.de ------*/
  +    private String m_publisherName;
  +    private AltrmiPublisher m_altrmiPublisher;
  +    private Map m_publications;
  +    private List m_queue;
  +
  +    /**
  +     * Method configure
  +     *
  +     *
  +     * @param configuration
  +     *
  +     * @throws ConfigurationException
  +     *
  +     */
  +    public void configure(final Configuration configuration) throws ConfigurationException
  +    {
  +
  +        m_publisherName = configuration.getChild("publisher").getValue("altrmification");
  +        m_publications = new HashMap();
  +
  +        final Configuration[] confs = configuration.getChildren("publish");
  +
  +        for (int i = 0; i < confs.length; i++)
  +        {
  +            final Configuration conf = confs[i];
  +            final String blockName = conf.getAttribute("block");
  +            final String publishAsName = conf.getAttribute("publishAsName");
  +            final String interfaceToPublish = conf.getAttribute("interfaceToPublish");
  +
  +            m_publications.put(blockName, new PublicationInfo(publishAsName, interfaceToPublish));
  +        }
  +
  +        m_queue = new ArrayList();
  +    }
  +
  +    /**
  +     * Method blockAdded
  +     *
  +     *
  +     * @param event
  +     *
  +     */
  +    public void blockAdded(final BlockEvent event)
  +    {
  +
  +        System.out.println("Block " + event.getName() + " added");
  +
  +        if (m_publisherName.equals(event.getName()))
  +        {
  +            m_altrmiPublisher = (AltrmiPublisher) event.getBlock();
  +        }
  +
  +        if (m_publications.containsKey(event.getName()))
  +        {
  +            final Block block = event.getBlock();
  +            final String blockName = event.getName();
  +            PublicationInfo pi = (PublicationInfo) m_publications.get(event.getName());
  +
  +            try
  +            {
  +                m_altrmiPublisher.publish(block, pi.getPublishAsName(),
  +                                          Class.forName(pi.getInterfaceToPublish()));
  +            }
  +            catch (AltrmiPublicationException e)
  +            {
  +                throw new CascadingRuntimeException("Some problem auto-publishing", e);
  +            }
  +            catch (ClassNotFoundException e)
  +            {
  +                throw new CascadingRuntimeException(
  +                    "Interface specifies in config.xml ('interfaceToPublish' attribte) not found",
  +                    e);
  +            }
  +        }
  +    }
  +
  +    /**
  +     * Method blockRemoved
  +     *
  +     *
  +     * @param event
  +     *
  +     */
  +    public void blockRemoved(final BlockEvent event)
  +    {
  +
  +        System.out.println("Block " + event.getName() + " removed");
  +
  +        if (m_publications.containsKey(event.getName()))
  +        {
  +            final Block block = event.getBlock();
  +            final String blockName = event.getName();
  +            PublicationInfo pi = (PublicationInfo) m_publications.get(event.getName());
  +
  +            try
  +            {
  +                m_altrmiPublisher.unPublish(block, pi.getPublishAsName());
  +            }
  +            catch (AltrmiPublicationException e)
  +            {
  +                throw new CascadingRuntimeException("Some problem un-auto-publishing", e);
  +            }
  +        }
  +    }
  +}
  
  
  
  1.2       +45 -18    jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/autopublishing/PublicationInfo.java
  
  Index: PublicationInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/autopublishing/PublicationInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PublicationInfo.java	14 Jan 2002 13:11:37 -0000	1.1
  +++ PublicationInfo.java	16 Jan 2002 13:30:03 -0000	1.2
  @@ -10,27 +10,54 @@
   
   
   
  +/**
  + * Class PublicationInfo
  + *
  + *
  + * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  + * @version $Revision: 1.2 $
  + */
   public class PublicationInfo
   {
  -   private final String mPublishAsName;
  -   private final String mInterfaceToPublish;
   
  -   public PublicationInfo (String publishAsName, String interfaceToPublish)
  -   {
  -      mPublishAsName      = publishAsName;
  -      mInterfaceToPublish = interfaceToPublish;
  -   }
  +    private final String mPublishAsName;
  +    private final String mInterfaceToPublish;
   
  -   public String getPublishAsName ()
  -   {
  -      return mPublishAsName;
  -   }
  -
  -   public String getInterfaceToPublish ()
  -   {
  -      return mInterfaceToPublish;
  -   }
  -}
  +    /**
  +     * Constructor PublicationInfo
  +     *
  +     *
  +     * @param publishAsName
  +     * @param interfaceToPublish
  +     *
  +     */
  +    public PublicationInfo(String publishAsName, String interfaceToPublish)
  +    {
  +        mPublishAsName = publishAsName;
  +        mInterfaceToPublish = interfaceToPublish;
  +    }
   
  +    /**
  +     * Method getPublishAsName
  +     *
  +     *
  +     * @return
  +     *
  +     */
  +    public String getPublishAsName()
  +    {
  +        return mPublishAsName;
  +    }
   
  -/*------ Formatted by Jindent 3.24 Basic 1.0 --- http://www.jindent.de ------*/
  +    /**
  +     * Method getInterfaceToPublish
  +     *
  +     *
  +     * @return
  +     *
  +     */
  +    public String getInterfaceToPublish()
  +    {
  +        return mInterfaceToPublish;
  +    }
  +}
  
  
  
  1.5       +219 -216  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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractPublisher.java	15 Jan 2002 17:44:09 -0000	1.4
  +++ AbstractPublisher.java	16 Jan 2002 13:30:03 -0000	1.5
  @@ -14,6 +14,7 @@
   import org.apache.commons.altrmi.server.AltrmiPublicationException;
   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.impl.classretrievers.JarFileClassRetriever;
   import org.apache.commons.altrmi.server.impl.classretrievers.BaseMobileClassRetriever;
   import org.apache.commons.altrmi.server.impl.classretrievers.NoClassRetriever;
  @@ -23,9 +24,15 @@
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  +import org.apache.avalon.framework.component.Composable;
  +import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.phoenix.Block;
  +import org.apache.avalon.cornerstone.services.sockets.SocketManager;
  +
   import java.util.StringTokenizer;
   import java.util.Vector;
  +
   import java.net.MalformedURLException;
   
   
  @@ -34,234 +41,230 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
    */
  -
  -public abstract class AbstractPublisher
  -   extends AbstractLogEnabled
  -   implements AltrmiPublisher, Startable, Configurable, Initializable, Block
  +public abstract class AbstractPublisher extends AbstractLogEnabled
  +        implements AltrmiPublisher, Startable, Composable, Configurable, Initializable, Block
   {
  -   protected AltrmiServer mAltrmiServer;
  -   private ClassRetriever mClassRetriever;
   
  -   /**
  -    * 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.
  -    */
  +    protected AltrmiServer m_AltrmiServer;
  +    private ClassRetriever m_ClassRetriever;
  +    protected AltrmiAuthenticator m_AltrmiAuthenticator;
  +
  +    /**
  +     * 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
  +    {
  +
  +        String classRetrieverType = configuration.getChild("classRetrieverType").getValue();
  +
  +        if (classRetrieverType.equals("jarFile"))
  +        {
  +            StringTokenizer st =
  +                new StringTokenizer(configuration.getChild("gerneratedClassJarURLs").getValue(),
  +                                    ",");
  +            Vector vector = new Vector();
   
  -   public void configure (Configuration configuration)
  -      throws ConfigurationException
  -   {
  -      String classRetrieverType =
  -         configuration.getChild("classRetrieverType").getValue();
  -
  -      if (classRetrieverType.equals("jarFile"))
  -      {
  -         StringTokenizer st     = new StringTokenizer(
  -            configuration.getChild("gerneratedClassJarURLs").getValue(), ",");
  -         Vector          vector = new Vector();
  -
  -         while (st.hasMoreTokens())
  -         {
  -            vector.add(st.nextToken());
  -         }
  -
  -         String[] urls = new String [vector.size()];
  -
  -         vector.copyInto(urls);
  -
  -         try
  -         {
  -            mClassRetriever = new JarFileClassRetriever(urls);
  -         }
  -         catch (MalformedURLException mufe)
  -         {
  -            throw new ConfigurationException("URL Invalid", mufe);
  -         }
  -      }
  -      else
  -         if (classRetrieverType.equals("baseMobileClass"))
  -         {
  -            mClassRetriever = new BaseMobileClassRetriever();
  -         }
  -         else
  -            if (classRetrieverType.equals("none"))
  +            while (st.hasMoreTokens())
               {
  -               mClassRetriever = new NoClassRetriever();
  +                vector.add(st.nextToken());
               }
  -            else
  +
  +            String[] urls = new String[vector.size()];
  +
  +            vector.copyInto(urls);
  +
  +            try
               {
  -               throw new ConfigurationException(
  -                  "classRetrieverType must be 'baseMobileClass', 'jarFile' or 'none'");
  +                m_ClassRetriever = new JarFileClassRetriever(urls);
               }
  -   }
  +            catch (MalformedURLException mufe)
  +            {
  +                throw new ConfigurationException("URL Invalid", mufe);
  +            }
  +        }
  +        else if (classRetrieverType.equals("baseMobileClass"))
  +        {
  +            m_ClassRetriever = new BaseMobileClassRetriever();
  +        }
  +        else if (classRetrieverType.equals("none"))
  +        {
  +            m_ClassRetriever = new NoClassRetriever();
  +        }
  +        else
  +        {
  +            throw new ConfigurationException(
  +                "classRetrieverType must be 'baseMobileClass', 'jarFile' or 'none'");
  +        }
  +    }
  +
  +    /**
  +     * Method compose
  +     *
  +     *
  +     * @param manager
  +     *
  +     * @throws ComponentException
  +     *
  +     */
  +    public void compose(ComponentManager manager) throws ComponentException
  +    {
  +        m_AltrmiAuthenticator =
  +            (AltrmiAuthenticator) manager.lookup(AltrmiAuthenticator.class.getName());
  +    }
   
  -   /**
  +    /**
       * Initialialize the component. Initialization includes
       * allocating any resources required throughout the
       * components lifecycle.
       *
       * @exception Exception if an error occurs
       */
  -
  -   public void initialize ()
  -      throws Exception
  -   {
  -      mAltrmiServer.setClassRetriever(mClassRetriever);
  -   }
  -
  -   /**
  -    * Method publish
  -    *
  -    *
  -    * @param o
  -    * @param s
  -    * @param aClass
  -    *
  -    * @throws AltrmiPublicationException
  -    *
  -    */
  -
  -   public void publish (Object o, String s, Class aClass)
  -      throws AltrmiPublicationException
  -   {
  -      mAltrmiServer.publish(o, s, aClass);
  -   }
  -
  -   /**
  -    * Method publish
  -    *
  -    *
  -    * @param o
  -    * @param s
  -    * @param aClass
  -    * @param aClass1
  -    *
  -    * @throws AltrmiPublicationException
  -    *
  -    */
  -
  -   public void publish (Object o, String s, Class aClass, Class aClass1)
  -      throws AltrmiPublicationException
  -   {
  -      mAltrmiServer.publish(o, s, aClass, aClass1);
  -   }
  -
  -   /**
  -    * Method publish
  -    *
  -    *
  -    * @param o
  -    * @param s
  -    * @param aClass
  -    * @param classes
  -    *
  -    * @throws AltrmiPublicationException
  -    *
  -    */
  -
  -   public void publish (Object o, String s, Class aClass, Class[] classes)
  -      throws AltrmiPublicationException
  -   {
  -      mAltrmiServer.publish(o, s, aClass, classes);
  -   }
  -
  -   /**
  -    * Method publish
  -    *
  -    *
  -    * @param o
  -    * @param s
  -    * @param classes
  -    *
  -    * @throws AltrmiPublicationException
  -    *
  -    */
  -
  -   public void publish (Object o, String s, Class[] classes)
  -      throws AltrmiPublicationException
  -   {
  -      mAltrmiServer.publish(o, s, classes);
  -   }
  -
  -   /**
  -    * Method publish
  -    *
  -    *
  -    * @param o
  -    * @param s
  -    * @param classes
  -    * @param classes1
  -    *
  -    * @throws AltrmiPublicationException
  -    *
  -    */
  -
  -   public void publish (Object o, String s, Class[] classes, Class[] classes1)
  -      throws AltrmiPublicationException
  -   {
  -      mAltrmiServer.publish(o, s, classes, classes1);
  -   }
  -
  -   /**
  -    * Method unPublish
  -    *
  -    *
  -    * @param o
  -    * @param s
  -    *
  -    * @throws AltrmiPublicationException
  -    *
  -    */
  -
  -   public void unPublish (Object o, String s)
  -      throws AltrmiPublicationException
  -   {
  -      mAltrmiServer.unPublish(o, s);
  -   }
  -
  -   /**
  -    * Method replacePublished
  -    *
  -    *
  -    * @param o
  -    * @param s
  -    * @param o1
  -    *
  -    * @throws AltrmiPublicationException
  -    *
  -    */
  -
  -   public void replacePublished (Object o, String s, Object o1)
  -      throws AltrmiPublicationException
  -   {
  -      mAltrmiServer.replacePublished(o, s, o1);
  -   }
  -
  -   /**
  -    * Starts the component.
  -    *
  -    * @exception Exception if Component can not be started
  -    */
  -
  -   public void start ()
  -      throws Exception
  -   {
  -      mAltrmiServer.start();
  -   }
  -
  -   /**
  -    * Stops the component.
  -    *
  -    * @exception Exception if the Component can not be Stopped.
  -    */
  -
  -   public void stop ()
  -      throws Exception
  -   {
  -      mAltrmiServer.stop();
  -   }
  -}
  \ No newline at end of file
  +    public void initialize() throws Exception
  +    {
  +        m_AltrmiServer.setClassRetriever(m_ClassRetriever);
  +        m_AltrmiServer.setAuthenticator(m_AltrmiAuthenticator);
  +    }
  +
  +    /**
  +     * Method publish
  +     *
  +     *
  +     * @param o
  +     * @param s
  +     * @param aClass
  +     *
  +     * @throws AltrmiPublicationException
  +     *
  +     */
  +    public void publish(Object o, String s, Class aClass) throws AltrmiPublicationException
  +    {
  +        m_AltrmiServer.publish(o, s, aClass);
  +    }
  +
  +    /**
  +     * Method publish
  +     *
  +     *
  +     * @param o
  +     * @param s
  +     * @param aClass
  +     * @param aClass1
  +     *
  +     * @throws AltrmiPublicationException
  +     *
  +     */
  +    public void publish(Object o, String s, Class aClass, Class aClass1)
  +            throws AltrmiPublicationException
  +    {
  +        m_AltrmiServer.publish(o, s, aClass, aClass1);
  +    }
  +
  +    /**
  +     * Method publish
  +     *
  +     *
  +     * @param o
  +     * @param s
  +     * @param aClass
  +     * @param classes
  +     *
  +     * @throws AltrmiPublicationException
  +     *
  +     */
  +    public void publish(Object o, String s, Class aClass, Class[] classes)
  +            throws AltrmiPublicationException
  +    {
  +        m_AltrmiServer.publish(o, s, aClass, classes);
  +    }
  +
  +    /**
  +     * Method publish
  +     *
  +     *
  +     * @param o
  +     * @param s
  +     * @param classes
  +     *
  +     * @throws AltrmiPublicationException
  +     *
  +     */
  +    public void publish(Object o, String s, Class[] classes) throws AltrmiPublicationException
  +    {
  +        m_AltrmiServer.publish(o, s, classes);
  +    }
  +
  +    /**
  +     * Method publish
  +     *
  +     *
  +     * @param o
  +     * @param s
  +     * @param classes
  +     * @param classes1
  +     *
  +     * @throws AltrmiPublicationException
  +     *
  +     */
  +    public void publish(Object o, String s, Class[] classes, Class[] classes1)
  +            throws AltrmiPublicationException
  +    {
  +        m_AltrmiServer.publish(o, s, classes, classes1);
  +    }
  +
  +    /**
  +     * Method unPublish
  +     *
  +     *
  +     * @param o
  +     * @param s
  +     *
  +     * @throws AltrmiPublicationException
  +     *
  +     */
  +    public void unPublish(Object o, String s) throws AltrmiPublicationException
  +    {
  +        m_AltrmiServer.unPublish(o, s);
  +    }
  +
  +    /**
  +     * Method replacePublished
  +     *
  +     *
  +     * @param o
  +     * @param s
  +     * @param o1
  +     *
  +     * @throws AltrmiPublicationException
  +     *
  +     */
  +    public void replacePublished(Object o, String s, Object o1) throws AltrmiPublicationException
  +    {
  +        m_AltrmiServer.replacePublished(o, s, o1);
  +    }
  +
  +    /**
  +     * Starts the component.
  +     *
  +     * @exception Exception if Component can not be started
  +     */
  +    public void start() throws Exception
  +    {
  +        m_AltrmiServer.start();
  +    }
  +
  +    /**
  +     * Stops the component.
  +     *
  +     * @exception Exception if the Component can not be Stopped.
  +     */
  +    public void stop() throws Exception
  +    {
  +        m_AltrmiServer.stop();
  +    }
  +}
  
  
  
  1.3       +3 -6      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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RmiPublisher.java	10 Jan 2002 17:14:34 -0000	1.2
  +++ RmiPublisher.java	16 Jan 2002 13:30:03 -0000	1.3
  @@ -20,7 +20,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   
   public class RmiPublisher
  @@ -57,11 +57,8 @@
      public void initialize ()
         throws Exception
      {
  -      mAltrmiServer = new RmiServer(mHost, mPort);
  +      m_AltrmiServer = new RmiServer(mHost, mPort);
   
         super.initialize();
      }
  -}
  -
  -
  -/*------ Formatted by Jindent 3.24 Basic 1.0 --- http://www.jindent.de ------*/
  +}
  \ No newline at end of file
  
  
  
  1.3       +9 -1      jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/publishing/RmiPublisher.xinfo
  
  Index: RmiPublisher.xinfo
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/publishing/RmiPublisher.xinfo,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RmiPublisher.xinfo	15 Jan 2002 15:20:28 -0000	1.2
  +++ RmiPublisher.xinfo	16 Jan 2002 13:30:03 -0000	1.3
  @@ -1,5 +1,5 @@
   <?xml version="1.0"?>
  -<!DOCTYPE blockinfo PUBLIC "-//PHOENIX/Block Info DTD Version 1.0//EN" 
  +<!DOCTYPE blockinfo PUBLIC "-//PHOENIX/Block Info DTD Version 1.0//EN"
                     "http://jakarta.apache.org/phoenix/blockinfo_1_0.dtd">
   
   <blockinfo>
  @@ -13,5 +13,13 @@
     <services>
       <service name="org.apache.commons.altrmi.server.AltrmiPublisher" version="1.0" />
     </services>
  +
  +  <!-- services that are required by this block -->
  +  <dependencies>
  +    <dependency>
  +      <service name="org.apache.commons.altrmi.server.AltrmiAuthenticator" version="1.0"/>
  +    </dependency>
  +  </dependencies>
  +
   
   </blockinfo>
  
  
  
  1.3       +38 -27    jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/publishing/SocketObjectStreamConnectionHandler.java
  
  Index: SocketObjectStreamConnectionHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/publishing/SocketObjectStreamConnectionHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SocketObjectStreamConnectionHandler.java	10 Jan 2002 17:14:34 -0000	1.2
  +++ SocketObjectStreamConnectionHandler.java	16 Jan 2002 13:30:03 -0000	1.3
  @@ -15,38 +15,49 @@
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.cornerstone.services.connection.ConnectionHandler;
   import org.apache.commons.altrmi.server.impl.socket.PartialSocketObjectStreamServer;
  +
   import java.net.Socket;
   import java.net.ProtocolException;
  +
   import java.io.IOException;
   
   
  -public class SocketObjectStreamConnectionHandler
  -   extends AbstractLogEnabled
  -   implements Component, ConnectionHandler
  +/**
  + * Class SocketObjectStreamConnectionHandler
  + *
  + *
  + * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  + * @version $Revision: 1.3 $
  + */
  +public class SocketObjectStreamConnectionHandler extends AbstractLogEnabled
  +        implements Component, ConnectionHandler
   {
  -   private PartialSocketObjectStreamServer m_PartialSocketObjectStreamServer;
   
  -   public SocketObjectStreamConnectionHandler (
  -           PartialSocketObjectStreamServer partialSocketObjectStreamServer)
  -   {
  -      m_PartialSocketObjectStreamServer = partialSocketObjectStreamServer;
  -   }
  -
  -   /**
  -    * Handle a connection.
  -    * This handler is responsible for processing connections as they occur.
  -    *
  -    * @param connection the connection
  -    * @exception IOException if an error reading from socket occurs
  -    * @exception ProtocolException if an error handling connection occurs
  -    */
  -
  -   public void handleConnection (Socket connection)
  -      throws IOException, ProtocolException
  -   {
  -      m_PartialSocketObjectStreamServer.handleConnection(connection);
  -   }
  -}
  +    private PartialSocketObjectStreamServer m_PartialSocketObjectStreamServer;
   
  -
  -/*------ Formatted by Jindent 3.24 Basic 1.0 --- http://www.jindent.de ------*/
  +    /**
  +     * Constructor SocketObjectStreamConnectionHandler
  +     *
  +     *
  +     * @param partialSocketObjectStreamServer
  +     *
  +     */
  +    public SocketObjectStreamConnectionHandler(
  +            PartialSocketObjectStreamServer partialSocketObjectStreamServer)
  +    {
  +        m_PartialSocketObjectStreamServer = partialSocketObjectStreamServer;
  +    }
  +
  +    /**
  +     * Handle a connection.
  +     * This handler is responsible for processing connections as they occur.
  +     *
  +     * @param connection the connection
  +     * @exception IOException if an error reading from socket occurs
  +     * @exception ProtocolException if an error handling connection occurs
  +     */
  +    public void handleConnection(Socket connection) throws IOException, ProtocolException
  +    {
  +        m_PartialSocketObjectStreamServer.handleConnection(connection);
  +    }
  +}
  
  
  
  1.4       +98 -99    jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/publishing/SocketObjectStreamPublisher.java
  
  Index: SocketObjectStreamPublisher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/publishing/SocketObjectStreamPublisher.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SocketObjectStreamPublisher.java	10 Jan 2002 17:14:34 -0000	1.3
  +++ SocketObjectStreamPublisher.java	16 Jan 2002 13:30:03 -0000	1.4
  @@ -21,6 +21,7 @@
   import org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory;
   import org.apache.avalon.cornerstone.services.connection.ConnectionHandler;
   import org.apache.commons.altrmi.server.impl.socket.PartialSocketObjectStreamServer;
  +
   import java.net.InetAddress;
   import java.net.UnknownHostException;
   import java.net.ServerSocket;
  @@ -31,106 +32,104 @@
    *
    *
    * @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 SocketObjectStreamPublisher
  -   extends AbstractPublisher
  -   implements Composable, ConnectionHandlerFactory
  +public class SocketObjectStreamPublisher extends AbstractPublisher
  +        implements ConnectionHandlerFactory
   {
  -   private SocketManager     m_socketManager;
  -   private ConnectionManager m_connectionManager;
  -   private int               m_port;
  -   private InetAddress       m_bindTo;
  -
  -   /**
  -    * 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);
  -
  -      m_port = configuration.getChild("port").getValueAsInteger();
  -
  -      try
  -      {
  -         final String bindAddress = configuration.getChild("bind").getValue();
  -
  -         m_bindTo = InetAddress.getByName(bindAddress);
  -      }
  -      catch (final UnknownHostException unhe)
  -      {
  -         throw new ConfigurationException("Malformed bind parameter", unhe);
  -      }
  -   }
  -
  -   public void compose (ComponentManager manager)
  -      throws ComponentException
  -   {
  -      m_socketManager     =
  -         ( SocketManager ) manager.lookup(SocketManager.ROLE);
  -      m_connectionManager =
  -         ( ConnectionManager ) manager.lookup(ConnectionManager.ROLE);
  -   }
  -
  -   /**
  -    * Construct an appropriate ConnectionHandler.
  -    *
  -    * @return the new ConnectionHandler
  -    * @exception Exception if an error occurs
  -    */
  -
  -   public ConnectionHandler createConnectionHandler ()
  -      throws Exception
  -   {
  -      final SocketObjectStreamConnectionHandler handler =
  -         new SocketObjectStreamConnectionHandler(
  -            ( PartialSocketObjectStreamServer ) mAltrmiServer);
  -
  -      setupLogger(handler);
  -
  -      return handler;
  -   }
  -
  -   /**
  -    * Release a previously created ConnectionHandler.
  -    * e.g. for spooling.
  -    */
  -
  -   public void releaseConnectionHandler (ConnectionHandler connectionHandler)
  -   {
  -   }
  -
  -   /**
  -    * Initialialize the component. Initialization includes
  -    * allocating any resources required throughout the
  -    * components lifecycle.
  -    *
  -    * @exception Exception if an error occurs
  -    */
  -
  -   public void initialize ()
  -      throws Exception
  -   {
  -      mAltrmiServer = new PartialSocketObjectStreamServer();
  -
  -      super.initialize();
  -
  -      final ServerSocketFactory factory      =
  -         m_socketManager.getServerSocketFactory("plain");
  -      final ServerSocket        serverSocket =
  -         factory.createServerSocket(m_port, 5, m_bindTo);
  -
  -      m_connectionManager.connect("SocketObjectStreamListener", serverSocket,
  -                                  this);
  -   }
  -}
   
  +    private SocketManager m_socketManager;
  +    private ConnectionManager m_connectionManager;
  +    private int m_port;
  +    private InetAddress m_bindTo;
  +
  +    /**
  +     * 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);
  +
  +        m_port = configuration.getChild("port").getValueAsInteger();
  +
  +        try
  +        {
  +            final String bindAddress = configuration.getChild("bind").getValue();
  +
  +            m_bindTo = InetAddress.getByName(bindAddress);
  +        }
  +        catch (final UnknownHostException unhe)
  +        {
  +            throw new ConfigurationException("Malformed bind parameter", unhe);
  +        }
  +    }
  +
  +    /**
  +     * Method compose
  +     *
  +     *
  +     * @param manager
  +     *
  +     * @throws ComponentException
  +     *
  +     */
  +    public void compose(ComponentManager manager) throws ComponentException
  +    {
  +
  +        super.compose(manager);
  +
  +        m_socketManager = (SocketManager) manager.lookup(SocketManager.ROLE);
  +        m_connectionManager = (ConnectionManager) manager.lookup(ConnectionManager.ROLE);
  +    }
  +
  +    /**
  +     * Construct an appropriate ConnectionHandler.
  +     *
  +     * @return the new ConnectionHandler
  +     * @exception Exception if an error occurs
  +     */
  +    public ConnectionHandler createConnectionHandler() throws Exception
  +    {
  +
  +        final SocketObjectStreamConnectionHandler handler =
  +            new SocketObjectStreamConnectionHandler(
  +                (PartialSocketObjectStreamServer) m_AltrmiServer);
  +
  +        setupLogger(handler);
  +
  +        return handler;
  +    }
  +
  +    /**
  +     * Release a previously created ConnectionHandler.
  +     * e.g. for spooling.
  +     */
  +    public void releaseConnectionHandler(ConnectionHandler connectionHandler)
  +    {
  +    }
  +
  +    /**
  +     * 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 PartialSocketObjectStreamServer();
   
  -/*------ Formatted by Jindent 3.24 Basic 1.0 --- http://www.jindent.de ------*/
  +        super.initialize();
  +
  +        final ServerSocketFactory factory = m_socketManager.getServerSocketFactory("plain");
  +        final ServerSocket serverSocket = factory.createServerSocket(m_port, 5, m_bindTo);
  +
  +        m_connectionManager.connect("SocketObjectStreamListener", serverSocket, this);
  +    }
  +}
  
  
  
  1.4       +6 -3      jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/publishing/SocketObjectStreamPublisher.xinfo
  
  Index: SocketObjectStreamPublisher.xinfo
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/publishing/SocketObjectStreamPublisher.xinfo,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SocketObjectStreamPublisher.xinfo	15 Jan 2002 15:21:15 -0000	1.3
  +++ SocketObjectStreamPublisher.xinfo	16 Jan 2002 13:30:03 -0000	1.4
  @@ -1,5 +1,5 @@
   <?xml version="1.0"?>
  -<!DOCTYPE blockinfo PUBLIC "-//PHOENIX/Block Info DTD Version 1.0//EN" 
  +<!DOCTYPE blockinfo PUBLIC "-//PHOENIX/Block Info DTD Version 1.0//EN"
                     "http://jakarta.apache.org/phoenix/blockinfo_1_0.dtd">
   
   <blockinfo>
  @@ -19,9 +19,12 @@
         <service name="org.apache.avalon.cornerstone.services.sockets.SocketManager" version="1.0"/>
       </dependency>
       <dependency>
  -      <service name="org.apache.avalon.cornerstone.services.connection.ConnectionManager" 
  +      <service name="org.apache.avalon.cornerstone.services.connection.ConnectionManager"
                  version="1.0"/>
       </dependency>
  -  </dependencies>    
  +    <dependency>
  +      <service name="org.apache.commons.altrmi.server.AltrmiAuthenticator" version="1.0"/>
  +    </dependency>
  +  </dependencies>
   
   </blockinfo>
  
  
  
  1.6       +86 -98    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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractSubscriber.java	15 Jan 2002 17:42:30 -0000	1.5
  +++ AbstractSubscriber.java	16 Jan 2002 13:30:03 -0000	1.6
  @@ -30,108 +30,96 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
    */
  -
  -public abstract class AbstractSubscriber
  -   extends AbstractLogEnabled
  -   implements AltrmiInterfaceLookup, Configurable, Initializable, Block
  +public abstract class AbstractSubscriber extends AbstractLogEnabled
  +        implements AltrmiInterfaceLookup, Configurable, Initializable, Block
   {
  -   protected AltrmiFactory     mAltrmiFactory;
  -   protected AltrmiHostContext mHostContext;
   
  -   /**
  -    * 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.
  -    */
  +    protected AltrmiFactory mAltrmiFactory;
  +    protected AltrmiHostContext mHostContext;
   
  -   public void configure (Configuration configuration)
  -      throws ConfigurationException
  -   {
  -      String proxyClassLocation =
  -         configuration.getChild("proxyClassLocation").getValue();
  -
  -      if (proxyClassLocation.equals("client"))
  -      {
  -         mAltrmiFactory = new ClientClassAltrmiFactory(false);
  -      }
  -      else
  -         if (proxyClassLocation.equals("server"))
  -         {
  +    /**
  +     * 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
  +    {
  +
  +        String proxyClassLocation = configuration.getChild("proxyClassLocation").getValue();
  +
  +        if (proxyClassLocation.equals("client"))
  +        {
  +            mAltrmiFactory = new ClientClassAltrmiFactory(false);
  +        }
  +        else if (proxyClassLocation.equals("server"))
  +        {
               mAltrmiFactory = new ServerClassAltrmiFactory(false);
  -         }
  -         else
  -         {
  -            throw new ConfigurationException(
  -               "proxyClassLocation must be 'client' or 'server'");
  -         }
  -   }
  -
  -   /**
  -    * Method lookup
  -    *
  -    *
  -    * @param publishedName
  -    *
  -    * @return
  -    *
  -    * @throws AltrmiConnectionException
  +        }
  +        else
  +        {
  +            throw new ConfigurationException("proxyClassLocation must be 'client' or 'server'");
  +        }
  +    }
  +
  +    /**
  +     * Method lookup
  +     *
  +     *
  +     * @param publishedName
  +     *
  +     * @return
  +     *
  +     * @throws AltrmiConnectionException
  +     *
  +     */
  +    public Object lookup(String publishedName) throws AltrmiConnectionException
  +    {
  +        return mAltrmiFactory.lookup(publishedName);
  +    }
  +
  +    /**
  +     * Method lookup
  +     *
  +     *
  +     * @param publishedName
  +     * @param authentication
  +     *
  +     * @return
  +     *
  +     * @throws AltrmiConnectionException
  +     *
  +     */
  +    public Object lookup(String publishedName, AltrmiAuthentication authentication)
  +            throws AltrmiConnectionException
  +    {
  +        return mAltrmiFactory.lookup(publishedName, authentication);
  +    }
  +
  +    /**
  +     * Method getTextToSignForAuthentication
  +     *
  +     *
  +     * @return
  +     *
  +     */
  +    public String getTextToSignForAuthentication()
  +    {
  +        return mAltrmiFactory.getTextToSignForAuthentication();
  +    }
  +
  +    /**
  +    * Initialialize the component. Initialization includes
  +    * allocating any resources required throughout the
  +    * components lifecycle.
       *
  +    * @exception Exception if an error occurs
       */
  -
  -   public Object lookup (String publishedName)
  -      throws AltrmiConnectionException
  -   {
  -      return mAltrmiFactory.lookup(publishedName);
  -   }
  -
  -   /**
  -    * Method lookup
  -    *
  -    *
  -    * @param publishedName
  -    * @param authentication
  -    *
  -    * @return
  -    *
  -    * @throws AltrmiConnectionException
  -    *
  -    */
  -
  -   public Object lookup (String publishedName,
  -                         AltrmiAuthentication authentication)
  -      throws AltrmiConnectionException
  -   {
  -      return mAltrmiFactory.lookup(publishedName, authentication);
  -   }
  -
  -   /**
  -    * Method getTextToSignForAuthentication
  -    *
  -    *
  -    * @return
  -    *
  -    */
  -
  -   public String getTextToSignForAuthentication ()
  -   {
  -      return mAltrmiFactory.getTextToSignForAuthentication();
  -   }
  -
  -   /**
  -   * Initialialize the component. Initialization includes
  -   * allocating any resources required throughout the
  -   * components lifecycle.
  -   *
  -   * @exception Exception if an error occurs
  -   */
  -
  -   public void initialize ()
  -      throws Exception
  -   {
  -      mAltrmiFactory.setHostContext(mHostContext);
  -   }
  -}
  \ No newline at end of file
  +    public void initialize() throws Exception
  +    {
  +        mAltrmiFactory.setHostContext(mHostContext);
  +    }
  +}
  
  
  
  1.3       +33 -39    jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/subscription/RmiSubscriber.java
  
  Index: RmiSubscriber.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/subscription/RmiSubscriber.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RmiSubscriber.java	10 Jan 2002 17:14:35 -0000	1.2
  +++ RmiSubscriber.java	16 Jan 2002 13:30:03 -0000	1.3
  @@ -20,48 +20,42 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
  -
  -public class RmiSubscriber
  -   extends AbstractSubscriber
  +public class RmiSubscriber extends AbstractSubscriber
   {
  -   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
  -   {
  -      mHostContext = new RmiAltrmiHostContext(mHost, mPort);
  +    private String mHost;
  +    private int mPort;
   
  -      super.initialize();
  -   }
  -}
  +    /**
  +     * 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
  +    {
   
  +        mHostContext = new RmiAltrmiHostContext(mHost, mPort);
   
  -/*------ Formatted by Jindent 3.24 Basic 1.0 --- http://www.jindent.de ------*/
  +        super.initialize();
  +    }
  +}
  
  
  
  1.4       +33 -39    jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/subscription/SocketObjectStreamSubscriber.java
  
  Index: SocketObjectStreamSubscriber.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/subscription/SocketObjectStreamSubscriber.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SocketObjectStreamSubscriber.java	10 Jan 2002 17:14:35 -0000	1.3
  +++ SocketObjectStreamSubscriber.java	16 Jan 2002 13:30:03 -0000	1.4
  @@ -21,48 +21,42 @@
    *
    *
    * @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 SocketObjectStreamSubscriber
  -   extends AbstractSubscriber
  +public class SocketObjectStreamSubscriber extends AbstractSubscriber
   {
  -   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
  -   {
  -      mHostContext = new SocketObjectStreamHostContext(mHost, mPort);
  +    private String mHost;
  +    private int mPort;
   
  -      super.initialize();
  -   }
  -}
  +    /**
  +     * 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
  +    {
   
  +        mHostContext = new SocketObjectStreamHostContext(mHost, mPort);
   
  -/*------ Formatted by Jindent 3.24 Basic 1.0 --- http://www.jindent.de ------*/
  +        super.initialize();
  +    }
  +}
  
  
  

--
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