Re: LookupDiscovery MulticastTimeToLive
Bob Scheifler <[email protected]>
| Newsgroups | gmane.comp.java.sun.jini |
|---|---|
| Message-ID | <[email protected]> |
> I really should find out for myself
Indeed, it's in the LookupDiscovery javadoc.
> but how do I set the MulticastTimeToLive for LookupDiscovery? I suppose
> I'm supposed to write something like discoveryConstraints = ???
import net.jini.constraint.BasicMethodConstraints;
import net.jini.constraint.BasicMethodConstraints.MethodDesc;
import net.jini.core.constraint.InvocationConstraints;
import net.jini.core.constraint.InvocationConstraint;
import com.sun.discovery.MulticastTimeToLive;
net.jini.discovery.LookupDiscovery {
discoveryConstraints =
new BasicMethodConstraints(
new MethodDesc[]{
new MethodDesc(
"multicastRequest",
new InvocationConstraints(
new InvocationConstraint[]{
new MulticastTimeToLive(<n>)},
null)),
new MethodDesc(
"multicastAnnouncement",
new InvocationConstraints(
new InvocationConstraint[]{
new MulticastTimeToLive(<n>)},
null))});
}
> Also, is the default value 225 or did I dream that?
It's 15 (per recommendation in the D&J spec).
> Could someone point
> me in the right direction for understanding what this means more
> practically (if remotely correct)
It's essentially how many router hops you want it to traverse.
- Bob
--------------------------------------------------------------------------
Getting Started: http://www.jini.org/wiki/Category:Getting_Started
Community Web Site: http://jini.org
jini-users Archive: http://archives.java.sun.com/archives/jini-users.html
Unsubscribing: email "signoff JINI-USERS" to [email protected]