Sample JEgg applications
To give an idea of what a non-trivial JEgg application looks like, take
a look at the code in the /src/examples directory. Currently,
there's only a single sample application, but its use of JEgg should
prove informative. You can access the samples either from the CVS
repository, or by downloading the source distribution.
This application has a client-server architecture with the server
providing a prime number generation service over the network, although
in the example, the server and client both run on the same host, in the
same JVM, for simplicity. Most of the code in the example
appears in the implementation of a full-duplex "packet transport"
service that the application eggs (the prime generation service and its
clients) use to send and receive packets. In the example, the
prime number generating server is triggered to generate a number by the
reception of an arbitrary packet and responds to the client with a
packet containing the next prime number in its sequence.
There are more details about this sample in file