bindService()

This method is called when another netlet uses a warrant to bind to us. Of course, we, the hello world client, don't offer any warrant-based services, and in fact there won't be any warrants in the world which allow anyone to connect to us. So if, through some bizarre accident, this method should get called we must throw an exception.

But the very interesting thing about this bindService() method is that it is exactly this method inside the hello world service which gets called when we call bindService() in the initialise() method above. When we call bindService() with a warrant on our node the request goes right across to the hello world service, and its own bindService() method receives the request. All the networking is handled by the node (and there's quite a few things that happen in between) but all that's transparent to us. The point is, the bindService() method of INetlet is what gets called when another netlet uses a warrant to bind to us.

Nik Silver 2002-03-09