Class Main
java.lang.Object
Main
Entry point for the babel-demo peer-to-peer chat.
The demo composes three Babel protocols and lets the runtime wire them together through asynchronous events:
GossipBasedFullMembership— keeps us connected to the other nodes and finds them automatically (it's aDiscoverableProtocol);FloodBroadcast— disseminates messages to all neighbours;ChatApp— the interactive mIRC-style chat on top.
Launch: java -jar babel-demo.jar nick=<name> [babel.port=<port>]
[babel.interface=<nic>] [babel.address=<ip>] [membership.contact=<host>:<port>]
-
Field Details
-
PAR_NICK
Your chat nickname — how you appear to everyone else. No default: if it is omitted, the launcher prompts for one interactively at startup (when run on a terminal). It must be supplied asnick=<name>only when there is no interactive console (e.g. piped input).- See Also:
-
PAR_DEFAULT_BABEL_PORT
Default value for the TCP port (Babel.PAR_DEFAULT_PORT, i.e.babel.port) this node binds and listens on. Run several nodes on one machine by giving each a distinct port; across machines the same port is fine. babel-core owns the key but defines no default value, so the demo supplies one here.- See Also:
-
-
Constructor Details
-
Main
public Main()
-
-
Method Details
-
main
- Throws:
Exception
-