I always liked the way Apple Rendezvous or Zeroconf was written by combining existing internet standards like DNS and DHCP in different ways.
Now we as Java developers can join in the fun as well. Strangeberry a cryptic (dare I say Stealth) startup in Palo Alto have released a LGPL'd library for publishing and listening for Rendezvous services.
This is super cool I think. The library itself is nice and lean. What this means is that anyone with a SOAP, XML-RPC or even just plain vanilla HTML service can publish it easy for use on very local networks.
This is code out of the readme file for Service Registration:
import com.strangeberry.rendezvous.*;Rendezvous rendezvous = new Rendezvous();
rendezvous.registerService(
new ServiceInfo("_http._tcp.local.", "foo._http._tcp.local.", 1234, "index.html")
);
and for Service Discovery:
import com.strangeberry.rendezvous.*;static class SampleListener implements ServiceListener
{
public void addService(Rendezvous rendezvous, String type, String name)
{
System.out.println("ADD: " + rendezvous.getServiceInfo(type, name));
}
public void removeService(Rendezvous rendezvous, String type, String name)
{
System.out.println("REMOVE: " + name);
}
}Rendezvous rendezvous = new Rendezvous();
rendezvous.addServiceListener("_http._tcp.local.", new SampleListener());
This entry was posted in the following Categories: Java
Yep. Take a look at ZOE, a java app server of sort:
http://guests.evectors.it/zoe/
It uses this library to advertise its different services. One of them integrates with Apple's system services. Pretty nifty :-)
Posted by: Zoe on December 18, 2002 01:12 PM