For your first examples of JSDT systems, you should take a look at the examples in the JSDT download, including chat, whiteboard, stock quotes, phone, synthesizer, and a music server.
This chat application goes a step beyond the chat
example by demonstrating several additional features of JSDT. It
shows, among other things, how to monitor what is happening in the JSDT,
by using Listeners such as SessionListener
, how to query
the SessionFactory
about current Sessions
and a Session
about its Clients
, and
how to isolate the JSDT from the upper application layers.
This example includes some of the latest features from JSDT 2.0 such
as the RegistryListener
.
The client-side and server-side GUIs let you monitor what's going
on with the Sessions
, to give you a better understanding
of how the JSDT works.
The extensive comments are meant to explain some of the aspects of JSDT.
How to run the applications:
sessions.properties
to give a list of Sessions to
start at start-up time. You can also add Sessions at
run-time with the "add sessions" button.
java ddj.DDJChatServer
Sessions
.
java ddj.ChatApplication serverName
java ddj.ChatApplication localhost
Session
by choosing it from the list.
Session
.
Directories/files in this distribution:
Readme.html
: This file
src
: The source files for this example.
classes
: The directory from which to execute the applications.
classes/jsdt.jar
: The JSDT binary from JSDT 2.0 Beta.
classes/sessions.properties
: A list of Sessions for the server to start.
classes/DDJChatServer.bat
: To run the Server.
The two MSDOS batch files are the only platform-dependent items
in this distribution, and, of course, instead of running the batch
files you can run the applications from the command line.
classes/DDJChatApplication.bat
: To run the client-side application.
classes/ddj/*.class
: Java class files compiled
from the *.java
files in the src/ddj directory.