We need two netlet descriptors for this example, one for the client
netlet and one for the provider netlet.
For the creating client netlet descriptor we specify the following:
- What type of thing we're making--a netlet descriptor.
- What the resulting netlet descriptor will be called--in our case,
hello2-client.xml.
- Where to find our JARs--on our system it's /usr/lib/jtrix
and the current directory.
- What JARs the netlet needs. Only one, in this case, which is hello2.jar.
It contains the Hello2Client and the IHelloFacet.
But it doesn't need anything else, because although it does use INetlet,
IService, etc from jtrix.jar it can always assume
that jtrix.jar will be available for it.
- The class name of the netlet--Hello2Client.
Meanwhile, the netlet descriptor for Hello2Provider is largely
the same. It differs only in these respects:
- The resulting netlet descriptor has a different filename. We choose
hello2-provider.xml.
- It needs hello2.jar as with the client, but this netlet also
needs nodality_facet.jar because that contains the INodeAdminFacet
and others through which it offers its IHelloFacet.
- The class name for this netlet is Hello2Provider.
From all this we get the following sequence:
% ls
hello2.jar
% jtrixmaker -type netlet -outfile hello2-client.xml \
-jardirs /usr/lib/jtrix . -jars hello2.jar \
-classname org.jtrix.project.helloworld.Hello2Client
% jtrixmaker -type netlet -outfile hello2-provider.xml \
-jardirs /usr/lib/jtrix . -jars nodality_facet.jar hello2.jar \
-classname org.jtrix.project.helloworld.Hello2Provider
% ls
hello2-client.xml hello2-provider.xml hello2.jar
%
The two descriptors that come out of this allow us to run them in
a node.
Nik Silver
2002-03-09