|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.sandia.ccaffeine.dc.distributed.ServerMux
public class ServerMux
|--in--| client1 |-------------|---in----|-----------|-out--| |controllerClient |--out----|ServerMux |--in--| client2 |-------------| |-----------|-out--| . . . . . .
Field Summary | |
---|---|
protected int |
builderPort
|
static java.lang.String |
DATA_COLLECTOR_ACK
|
static java.lang.String |
DATA_COLLECTOR_MSG
|
static java.lang.String |
DID_NOT_RECEIVE_HEARTBEAT_FROM_GUI_CLIENT
|
protected HeartbeatMonitor |
heartbeatMonitor
|
static java.lang.String |
REMOVE_CLIENT_MSG
|
static java.lang.String |
SERVER_SRC
|
static java.lang.String |
SHUTDOWN_MSG
|
Constructor Summary | |
---|---|
ServerMux(gov.sandia.ccaffeine.dc.distributed.ConnectionManager computeClientMgr,
Connection controllerConnect,
gov.sandia.ccaffeine.dc.distributed.ClientFactory clientFactory)
|
|
ServerMux(gov.sandia.ccaffeine.dc.distributed.ConnectionManager computeClientMgr,
Connection controllerConnect,
gov.sandia.ccaffeine.dc.distributed.ClientFactory clientFactory,
int heartbeatTimeout,
int builderPort)
|
|
ServerMux(java.io.InputStream[] in,
java.io.OutputStream[] out,
java.io.InputStream controllerInput,
java.io.OutputStream controllerOutput)
|
Method Summary | |
---|---|
void |
addOutOfBandListener(gov.sandia.ccaffeine.dc.distributed.OutOfBandListener l)
Register a listener to receive out of band messages recognized as lines beginning with an out of band token. |
void |
broadcastToClients(java.lang.String s)
|
void |
clientOutput(gov.sandia.ccaffeine.dc.distributed.ClientOutputEvent evt)
|
void |
didNotReceiveHeartbeat(HeartbeatEvent event)
If the heartbeat monitor notices that the GUI client has stopped sending heartbeats to the Muxer then the heartbeat monitor will invoke this method. |
void |
doClientIO()
Initiate listening and multiplexing client output now. |
java.lang.Thread |
getControllerClientThread()
|
int |
getNumClients()
|
static java.lang.String |
getOutofBandToken()
Return the out of band token. |
boolean |
isRunning()
|
protected void |
killAllMpiNodes(int builderPort)
Kill all MPI nodes |
void |
newConnect(Connection newConnection)
|
void |
receivedHeartbeat(HeartbeatEvent event)
|
void |
relayMessageFromController(java.lang.String s)
|
void |
relayMessageFromDataProducers(java.lang.String s)
|
void |
removeOutOfBandListener(gov.sandia.ccaffeine.dc.distributed.OutOfBandListener l)
|
void |
serverShuttingDown(ShutdownEvent event)
This method is invoked whenever the controllerClient shuts down. |
void |
setDataCollectorByName(java.lang.String className)
|
void |
setExternalClientOutputListener(gov.sandia.ccaffeine.dc.distributed.ClientOutputListener xLsnr)
|
void |
shutdown()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SERVER_SRC
public static final java.lang.String DATA_COLLECTOR_ACK
public static final java.lang.String REMOVE_CLIENT_MSG
public static final java.lang.String SHUTDOWN_MSG
public static final java.lang.String DATA_COLLECTOR_MSG
public static final java.lang.String DID_NOT_RECEIVE_HEARTBEAT_FROM_GUI_CLIENT
protected HeartbeatMonitor heartbeatMonitor
protected int builderPort
Constructor Detail |
---|
public ServerMux(java.io.InputStream[] in, java.io.OutputStream[] out, java.io.InputStream controllerInput, java.io.OutputStream controllerOutput)
public ServerMux(gov.sandia.ccaffeine.dc.distributed.ConnectionManager computeClientMgr, Connection controllerConnect, gov.sandia.ccaffeine.dc.distributed.ClientFactory clientFactory, int heartbeatTimeout, int builderPort)
computeClientMgr
- connections to MPI nodescontrollerConnect
- connection to GUI clientclientFactory
- factory that can create socket connectionsheartbeatTimout
- number of milliseconds we will wait
for a heartbeat from the GUI clientbuilderPort
- The Muxer port that the GUI client connects topublic ServerMux(gov.sandia.ccaffeine.dc.distributed.ConnectionManager computeClientMgr, Connection controllerConnect, gov.sandia.ccaffeine.dc.distributed.ClientFactory clientFactory)
Method Detail |
---|
public void serverShuttingDown(ShutdownEvent event)
serverShuttingDown
in interface ShutdownListener
event
- The event that is generated when the controllerClient shuts down.public void shutdown()
protected void killAllMpiNodes(int builderPort)
builderPort
- the port number, on the Muxer, that the
GUI client uses to connect to the Muxer.public void setExternalClientOutputListener(gov.sandia.ccaffeine.dc.distributed.ClientOutputListener xLsnr)
public java.lang.Thread getControllerClientThread()
public void doClientIO()
public void broadcastToClients(java.lang.String s)
public boolean isRunning()
public void didNotReceiveHeartbeat(HeartbeatEvent event)
didNotReceiveHeartbeat
in interface HeartbeatListener
event
- The event that gets generated whenever the
heartbeat monitor notices that the GUI client is no longer
sending heartbeats to the Muxer.public void receivedHeartbeat(HeartbeatEvent event)
receivedHeartbeat
in interface HeartbeatListener
public void clientOutput(gov.sandia.ccaffeine.dc.distributed.ClientOutputEvent evt)
public void newConnect(Connection newConnection)
public void relayMessageFromDataProducers(java.lang.String s)
public void relayMessageFromController(java.lang.String s)
public int getNumClients()
public void setDataCollectorByName(java.lang.String className)
public void addOutOfBandListener(gov.sandia.ccaffeine.dc.distributed.OutOfBandListener l)
public void removeOutOfBandListener(gov.sandia.ccaffeine.dc.distributed.OutOfBandListener l)
public static java.lang.String getOutofBandToken()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |