Re: How to set "use only configured seed rendezvous" attribute using ext.config.Configurator?

James Todd <[email protected]> Thu, 01 Sep 2005 09:16:26 -0700
Newsgroups gmane.comp.java.jxta.user
Message-ID <[email protected]>
Nulling out a bootstrap address is supported, eg:

    public void setRendezVousBootstrapAddress(URI 
rendezVousBootstrapAddress)
    throws ConfiguratorException {
        if (rendezVousBootstrapAddress != null &&
            Util.validateAddress(rendezVousBootstrapAddress, 
-1).trim().length() > 0) {
            throw new ConfiguratorException("invalid address: " +
                rendezVousBootstrapAddress);
        }

        //this.rendezVousBootstrap = rendezVousBootstrapAddress;
        this.rdvConfig.clearSeedingURIs();

        if (rendezVousBootstrapAddress != null) {
            this.rdvConfig.addSeedingURI(rendezVousBootstrapAddress);
        }
    }

If it doesn't work it is a bug.

note that the ext:config/profile *uses* the configurator API so while it 
is fair to assume that
all features exposed via profiles are available via the API as public 
interfaces. I suspect this
is significantly true although there could be some boundary cases (eg I 
didn't see "enable
multicast" the other day upon a cursory glance) but I suspect it is in 
there.

To be honest, I do recommend folks use ext:config/profile vs 
ext:config/api ... and more mods
are in the pipe that will make the profile even more attractive.

hth,

- 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 



Vanessa Williams wrote:

> In the profile, use:
>
>   <network>
>     <rendezVous bootstrap="">
>       <address>http://x.x.x.x:9700</address>
>     </rendezVous>
>   </network>
>
> I don't know if it's possible using the API, because the 
> method setRendezVousBootstrapAddress(URI) looks like it will not 
> accept an empty string. 
>
> Cheers,
>
> Vanessa
>
> On 1-Sep-05, at 9:07 AM, Joan Esteve wrote:
>
>> Hi,
>>
>> When i configure my jxta nodes i need to activatethe option "[ ] Use 
>> only configured seed rendezvous that appears in the default jxta 
>> configurator. I need to change this setting from the platform config:
>>
>> <Parm type="jxta:RdvConfig" config="client" xmlns:jxta="http://jxta.org">
>>             <seeds useOnlySeeds="true">
>>                 <addr>
>>                     http://x.x.x.x:9700
>>                 </addr>
>>                 <addr seeding="true">
>>                     http://rdv.jxtahosts.net/cgi-bin/rendezvous.cgi?2
>>                 </addr>
>>             </seeds>
>>         </Parm>
>>
>> I want to change this config with this another one:
>>
>> <Parm type="jxta:RdvConfig" config="client" xmlns:jxta="http://jxta.org">
>>             <seeds u eOnlySeeds="true">
>>                 <addr>
>>                     http://x.x.x.x:9700
>>                 </addr>
>>                 <addr seeding="*false*">              
>>                 </addr>
>>             </seeds>
>>         </Parm>
>>
>> What is the best way to do this using the API packaged in 
>> net.jxta.ext.config?
>>
>> Thank you very much
>>
>> Joan
>>
>