com.altair.hwm.comm
Class HWMCommMgr

java.lang.Object
  extended by com.altair.hwm.comm.HWMCommMgr

public class HWMCommMgr
extends java.lang.Object

Title: HWMCommMgr Description: The manager class that manages all the connections with the slave applications

. Company Altair Engineering, Inc.

:


Constructor Summary
HWMCommMgr()
          Constructor
 
Method Summary
 void AddComm(java.lang.String strSessionName, HWMComm hwmComm)
          Add a new HWMComm instance to the hashtable of comms strSessionName - The session name for this comm instance hwmComm - The comm instance to add
 HWMClientComm ConnectToApp(java.lang.String szSessionName, java.lang.String strAddress, int nPort)
          Purpose: Connects to any generic application that is listening at a specified port.
 HWMCommHM ConnectToHM(java.lang.String szSessionName, java.lang.String strAddress, int nPort)
          Purpose: Connects to an HM session that is listening at a specified port.
 HWMCommHM ConnectToMotion(java.lang.String szSessionName, java.lang.String strAddress, int nPort)
          Purpose: Connects to an HM session that is listening at a specified port.
 void DisconnectAllComms()
          Shutsdown the applications that were started and the clients that connected to server.
 void DisconnectComm(java.lang.String strSessionName)
          Shuts down the application started by a particular session
 HWMClientComm GetClientComm(java.lang.String strSessionName)
          Purpose: Searches the HashTable for the HWMClientComm that is associated with a given session name.
 HWMComm GetComm(java.lang.String strSessionName)
          Purpose: Searches the HashTable for the HWMServerComm that is associated with a given session name.
 DBServerComm GetDBComm(java.lang.String strSessionName)
          Purpose: Searches the HashTable for the DBServerComm that is associated with a given session name.
 HWMFSComm GetFileServerComm(java.lang.String strSessionName)
          Purpose: Searches the HashTable for the file server comm class that is associated with a given session name.
 HWMCommHM GetHM(java.lang.String szSessionName)
          Purpose: Searches the HashTable for the HWMCommHM that is associated with a given session name.
 HWMCommHM GetMotion(java.lang.String szSessionName)
          Purpose: Searches the HashTable for the HWMCommHM that is associated with a given session name.
 void RemoveSession(java.lang.String szSessionName)
          Purpose: Removes a Session/client comm Thread pair from the hashtable.
 HWMClientComm StartApp(java.lang.String szApp, java.lang.String[] arrszArgs, java.lang.String szWorkingDir, java.lang.String szSessionName)
          Purpose: Starts any generic application.
 DBServerComm StartDBComm(java.lang.String strSessionName)
          Purpose: Starts DB communication.
 HWMFSComm StartFileServerComm(java.lang.String strName, java.lang.String strAddress)
          Purpose: Starts communication with file server.
 HWMCommHM StartHM(java.lang.String szHMPath, java.lang.String[] arrszArgs, java.lang.String szWorkingDir, java.lang.String szSessionName)
          Purpose: Starts a new instance of HyperMesh.
 HWMCommHM StartMotion(java.lang.String szHMPath, java.lang.String[] arrszArgs, java.lang.String szWorkingDir, java.lang.String szSessionName)
          Purpose: Starts a new instance of MotionView/HyperView/HyperGraph (Built on the Motion FrameWork)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HWMCommMgr

public HWMCommMgr()
Constructor

Method Detail

DisconnectAllComms

public void DisconnectAllComms()
Shutsdown the applications that were started and the clients that connected to server. Should be called when the the instances are no more used


DisconnectComm

public void DisconnectComm(java.lang.String strSessionName)
Shuts down the application started by a particular session

Parameters:
strSessionName - The session id that started the application

RemoveSession

public void RemoveSession(java.lang.String szSessionName)
Purpose: Removes a Session/client comm Thread pair from the hashtable. DropApp is capable or removing pairs of any type, including HWMCommHM as well as HWMClientComms, etc...

Parameters:
szSessionName - -- The SessionName of the pair to be removed

GetComm

public HWMComm GetComm(java.lang.String strSessionName)
Purpose: Searches the HashTable for the HWMServerComm that is associated with a given session name.

Parameters:
String - strSessionName -- The Session Name that the Hash Table needs to be scanned for

AddComm

public void AddComm(java.lang.String strSessionName,
                    HWMComm hwmComm)
             throws java.lang.Exception
Add a new HWMComm instance to the hashtable of comms strSessionName - The session name for this comm instance hwmComm - The comm instance to add

Throws:
java.lang.Exception - If an comm by that session name exists

StartApp

public HWMClientComm StartApp(java.lang.String szApp,
                              java.lang.String[] arrszArgs,
                              java.lang.String szWorkingDir,
                              java.lang.String szSessionName)
Purpose: Starts any generic application.

Parameters:
String - szApp -- The application that the ClientComm Thread will be associated with
String[] - arrszArgs -- Any arguments that need to be passed to the application, BEYOND those needed for the communications
String - szWorkingDir -- The directory that the application should be started from
String - szSessionName -- The Session Name that should be used

ConnectToApp

public HWMClientComm ConnectToApp(java.lang.String szSessionName,
                                  java.lang.String strAddress,
                                  int nPort)
                           throws java.lang.Exception
Purpose: Connects to any generic application that is listening at a specified port.

Parameters:
String - szSessionName -- The Session Name that should be used
String - strAddress -- The IP address that the server app is listening at
int - nPort -- The port number that the server app is listening to
Throws:
java.lang.Exception - If any error occurs

GetClientComm

public HWMClientComm GetClientComm(java.lang.String strSessionName)
Purpose: Searches the HashTable for the HWMClientComm that is associated with a given session name.

Parameters:
String - szSessionName -- The Session Name that the Hash Table needs to be scanned for

StartHM

public HWMCommHM StartHM(java.lang.String szHMPath,
                         java.lang.String[] arrszArgs,
                         java.lang.String szWorkingDir,
                         java.lang.String szSessionName)
Purpose: Starts a new instance of HyperMesh.

Parameters:
String - szHMPath -- The full path to the version of HyperMesh that will be used.
String[] - arrszArgs -- Any arguments that need to be passed to the application, BEYOND those needed for the communications
String - szWorkingDir -- The directory that the application should be started from
String - szSessionName -- The Session Name that should be used

ConnectToHM

public HWMCommHM ConnectToHM(java.lang.String szSessionName,
                             java.lang.String strAddress,
                             int nPort)
                      throws java.lang.Exception
Purpose: Connects to an HM session that is listening at a specified port.

Parameters:
String - szSessionName -- The Session Name that should be used
String - strAddress -- The IP address that the HM is listening at
int - nPort -- The port number that the HM "server" is listening to
Throws:
java.lang.Exception - If any error occurs

GetHM

public HWMCommHM GetHM(java.lang.String szSessionName)
Purpose: Searches the HashTable for the HWMCommHM that is associated with a given session name.

Parameters:
String - szSessionName -- The Session Name that the Hash Table needs to be scanned for

StartMotion

public HWMCommHM StartMotion(java.lang.String szHMPath,
                             java.lang.String[] arrszArgs,
                             java.lang.String szWorkingDir,
                             java.lang.String szSessionName)
Purpose: Starts a new instance of MotionView/HyperView/HyperGraph (Built on the Motion FrameWork)

Parameters:
String - szHMPath -- The full path to the version of MV that will be used.
String[] - arrszArgs -- Any arguments that need to be passed to the application, BEYOND those needed for the communications
String - szWorkingDir -- The directory that the application should be started from
String - szSessionName -- The Session Name that should be used

ConnectToMotion

public HWMCommHM ConnectToMotion(java.lang.String szSessionName,
                                 java.lang.String strAddress,
                                 int nPort)
                          throws java.lang.Exception
Purpose: Connects to an HM session that is listening at a specified port.

Parameters:
String - szSessionName -- The Session Name that should be used
String - strAddress -- The IP address that the HM is listening at
int - nPort -- The port number that the HM "server" is listening to
Throws:
java.lang.Exception - If any error occurs

GetMotion

public HWMCommHM GetMotion(java.lang.String szSessionName)
Purpose: Searches the HashTable for the HWMCommHM that is associated with a given session name.

Parameters:
String - szSessionName -- The Session Name that the Hash Table needs to be scanned for

StartDBComm

public DBServerComm StartDBComm(java.lang.String strSessionName)
                         throws java.lang.Exception
Purpose: Starts DB communication.

Parameters:
String - strSessionName -- The name for this session
Throws:
java.lang.Exception

GetDBComm

public DBServerComm GetDBComm(java.lang.String strSessionName)
Purpose: Searches the HashTable for the DBServerComm that is associated with a given session name.

Parameters:
String - strSessionName -- The Session Name that the Hash Table needs to be scanned for

StartFileServerComm

public HWMFSComm StartFileServerComm(java.lang.String strName,
                                     java.lang.String strAddress)
                              throws java.lang.Exception
Purpose: Starts communication with file server.

Parameters:
strName - -- The name for this session
Throws:
java.lang.Exception

GetFileServerComm

public HWMFSComm GetFileServerComm(java.lang.String strSessionName)
Purpose: Searches the HashTable for the file server comm class that is associated with a given session name.

Parameters:
String - strSessionName -- The Session Name that the Hash Table needs to be scanned for