gov.sandia.ccaffeine.dc.distributed
Class MuxingProcess

java.lang.Object
  extended by gov.sandia.ccaffeine.dc.distributed.MuxingProcess

public class MuxingProcess
extends java.lang.Object

Meant to run in its own process, this class multiplexes multiple sockets (muxee) into one (muxor). The MuxingProcess treats both muxee and muxor as a client. Pays attention to several flags: --port \; --builderPort \.


Constructor Summary
MuxingProcess()
           
 
Method Summary
protected  void die(java.lang.String msg)
          Something is horribly wrong.
 void initAndStartProcess(java.lang.String[] args)
          Start listening initialize per the args, and start listening for connections from muxee's and muxor
 void initMuxingProcess(java.lang.String[] args)
          Setup the multiplexor with command line style arguments.
protected  void killAllMpiNodes(int builderPort)
          Kill all MPI nodes
static void main(java.lang.String[] args)
           
 void startMuxingProcess()
          Start the multiplexing now: throws IOException if initMuxingProcess has not been called first.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MuxingProcess

public MuxingProcess()
Method Detail

initAndStartProcess

public void initAndStartProcess(java.lang.String[] args)
Start listening initialize per the args, and start listening for connections from muxee's and muxor


initMuxingProcess

public void initMuxingProcess(java.lang.String[] args)
                       throws java.lang.Exception
Setup the multiplexor with command line style arguments.

Throws:
java.lang.Exception

die

protected void die(java.lang.String msg)
            throws java.lang.RuntimeException
Something is horribly wrong. Die.

Throws:
java.lang.RuntimeException

killAllMpiNodes

protected void killAllMpiNodes(int builderPort)
Kill all MPI nodes

Parameters:
builderPort - the port number, on the Muxer, that the GUI client uses to connect to the Muxer.

startMuxingProcess

public void startMuxingProcess()
                        throws java.io.IOException,
                               java.lang.InterruptedException
Start the multiplexing now: throws IOException if initMuxingProcess has not been called first. This method will not return until the clients close.

Throws:
java.io.IOException
java.lang.InterruptedException

main

public static void main(java.lang.String[] args)