Re: [JXTA dev] ext:config issues

James Todd <[email protected]> Thu, 26 May 2005 17:39:56 -0700
Newsgroups gmane.comp.java.jxta.user,gmane.comp.java.jxta.devel
Message-ID <[email protected]>
whoops, a more realistic AbstractConfigurator impl is as follows:

 import net.jxta.ext.config.AbstractConfigurator;
 import net.jxta.ext.config.Configurator;
 import net.jxta.exception.ConfiguratorException;

 import net.jxta.impl.protocol.PlatformConfig;

 public class MyConfigurator
   extends AbstractConfigurator {

   public PlatformConfig createPlatformConfig(Configurator c)
   throws ConfiguratorException {
       c.setName("myName");
       c.setSecurity("myId", "myPwd");

       return c.getPlatformConfig();
   }
 }

rock on,

- james

--
James Todd :: blogs.sun.com/gonzo | weblogs.java.net/blog/gonzo

MyJXTA :: use it - learn it - do it

Java == platform independence
XML  == application independence
JXTA == network independence

Secure End-to-End Computing


James Todd wrote:
> 
> I have created jUnit tests for the 4 ext:config issues I am looking to 
> resolve in the
> very near future:
> 
>  http://platform.jxta.org/issues/show_bug.cgi?id=1364 - edge optimizer
>  http://platform.jxta.org/issues/show_bug.cgi?id=1368 - simplify 
> AbstractConfigurator
>  http://platform.jxta.org/issues/show_bug.cgi?id=1373 - jxta home
>  http://platform.jxta.org/issues/show_bug.cgi?id=1374 - null relay 
> bootstrap
> 
> To run the tests:
> 
>  obtain Platform source
> 
>    http://wiki.java.net/bin/view/Jxta/BuildingJXTA
> 
>  cd platform/binding/java
> 
>  % ant runtestui
> 
>  note: the ext:config test suite is net.jxta.ext.config.AllTests
> 
> Re simplified AbstractConfigurator (#1368) here's the most fundamental 
> AbstractConfigurator
> implementation as derived directly from the afore mentioned jUnit tests:
> 
>  // xxx: note that a deprecated method impl is currently required but 
> will be removed for
>  //      the next release
>  package net.jxta.ext.config;
> 
>  import net.jxta.exception.ConfiguratorException;
> 
>  import net.jxta.impl.protocol.PlatformConfig;
> 
>  public class MyConfigurator
>    extends AbstractConfigurator {
> 
>    public PlatformConfig createPlatformConfig(Configurator c)
>    throws ConfiguratorException {
>        c.setName(TestBase.NAME);
>        c.setSecurity(TestBase.PRINCIPAL, TestBase.PASSWORD);
> 
>        return c.getPlatformConfig();
>    }
>  }
> 
> Your help is appreciated.
> 
> hth,
> 
> - james
>