Current version 1.3x beta
|
This software is NOT supported by the author anymore.
Please take a look at
Java Virtual Medium instead for a much better way of doing things.
The JMHS is designed to use some of the advanced features of java in order
to create a friendly interface to users/programmers that need/want to
build chat/multimedia/games/etc message based communication structures.
- General overview
-
The main issue here is to enable complex applets running on diferent hosts
to comunicate with each other through a server, chat like.
The new thing about it is the posibility to use the same server to send/receive
very different kinds of messages/files/dataarrays, using the same interface, in
a compatible way. So by starting a single java server (that means compatibility)
you're able to message with others any type of information with a maximum
feedback (conditioned by TCP/IP speed only) in a very transparent way.
(For example, to send a whole data structure from an applet to some other
applet, connected to the same server, you just have two steps: creating a Message
object using the class ClientMessageCreator with the specified destination
(broadcast, single destination, group broadcast etc.), containing the data
and then sending it using a method of the class ClientApplet (send(Message m)))
- Server perspective
-
The communication server provides a complex way of handling
(receiving, transmitting) messages and clients (groups,broadcasts,single destination).
It's main purpose is to facilitate & ease the whole process of connecting & comunicating
of a client (applet or standalone) with other clients. A client can be any program that is
compatible MHS, that is it uses Message creators & TCPIP handlers provided in the package.
The ideea is to let the client do the whole game/chat/multimedia strategy while the
server just takes care of message sending/receiving/broadcasting etc.
The server is designed to be used under all kind of loads, two players talking to each other
or 50 players playing some fancy game. It dynamically adjusts it's behaviour according to
the load and to the Message trafic.
- Server installation instructions
-
Installing the server is very easy. All you have to do is to
get the server compiled (compile the ServerMain.java classfile)
and to modify the server resource file
and the passwords. Those files are
selfexplaining and very easy to modify. Please read the instructions
and comments contained inside very carefully before modifying
anything. Starting the server is just a matter of executing
the command "java ServerMain resourcefile". The server starts
and depending on the level of debugging set at compile time it
might display allot of debugging info which you might use or
just redirect to /dev/null or some file.
- Client view
-
The process of connecting and communicating with others is eased at applet level
by the provided ClientApplet abstract class that takes
care of everything. The class must be subclassed and has easy to use tcp/ip methods and
html tag arguments parsing.
(It's really very simple to write for example a chat applet : just sublass the
ClientApplet class, create your own fancy interface, use
the ClientMessageCreator to create string messages
and enjoy sending them to everyone.)
At normal client level there is a Client class that offers
everything needed to communicate. (In fact, the ClientApplet uses a internal Client)
Here are some of the main documented classes of the system:
Client - general purpose client class
ClientApplet - abstract Applet client class
ClientMessageCreator - class used by clients to create various client-side messages
ConnectServerThread - thread that accepts connect requests
ConnectAAA - provides conect() level Authorization, Authentication & Accounting
ClientConnectAAA - provides client level conection AAA
DynamicNumbers - dynamically allocate and dealocate unique numbers
EmptyException - thrown when some data structure is empty
FullException - thrown when some data structure is full
NullClientConnectAAA - just fake AAA client side (does nothing)
NullServerConnectAAA - fake AAA server side (does nothing)
Message - general network byte message wrapper class
MessageConstants - defines some message specific constants
MessageCreator - used in creating various specific Messages
MessageParser - used in parsing (interpreting) a Message
Player - class wrapping a whole communication endpoint
RoundRobin - class used in reprezenting a circular list
RoundRobinServerThread - the heart of the whole comunication system
ServerConnectAAA - provides server level conection AAA
ServerMain - main server side class that starts all server threads
ServerMessageCreator - creates various server-side Messages
SyncSimpleQueue - a synchronized queue
TCPIPReadThread - reads data from the socket into a queue
TCPIPThread - not used anymore
TCPIPWriteThread - reads Messages from a queue and writes that data to a socket
Other classes:
ChatApplet
ConfigureConstants
util
If you're searching for something specific ...
Download the latest sources, docs & examples !