com.boylesoftware.cb2.bcmproviders.sockethub
Class Hub

java.lang.Object
  extended bycom.boylesoftware.cb2.bcmproviders.sockethub.Hub

public final class Hub
extends java.lang.Object

Standalone program, which plays the role of a message hub, or server. In the BCM implementation represented by this package cluster nodes connect to a centralized server. When a node needs to broadcast a message it sends it to the server and then the server sends it to all connected nodes. This approach allows keeping cluster nodes without knowledge of each other - all a node needs to know to be able to send and receive messages is the address of the hub.

This hub program is a CB2 based console application, which means it needs cb2app.properties file. It takes one command line option - directory, which contains the configuration file. If there are no command line arguments, user.dir system property is used, which points to the current working directory. The option is "-d" followed by the directory path.

To shutdown a running hub instance, run this class again and pass "shutdown" command line argument. To get information on currently connected clients give it "status" argument. The complete command line is:

java com.boylesoftware.cb2.bcmproviders.sockethub.Hub [-d <config dir>] [shutdown|status]

This program requires one application property - com.boylesoftware.cb2.broadcastMessaging.sockethub.port, which specifies what TCP port the hub uses to listen for cluster members' connections.

Version:
$Id: Hub.java,v 1.9 2004/04/08 18:32:23 levahim Exp $
Author:
Lev Himmelfarb

Method Summary
static void main(java.lang.String[] args)
          The program entry point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] args)
                 throws ApplicationException
The program entry point.

Parameters:
args - command line arguments.
Throws:
ApplicationException - if the program exits abnormally.


Copyright © 2002,2003,2004 - Boyle Software, Inc.