|
WIDAR Classes | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.nrc.widar.mccc.crm.Crm
public class Crm
WIDAR/EVLA - CRM: CorrelatorResourceMonitor Class
The Correlator Resource Monitor (CRM) main class.
The CRM is an application designed to self-test various subsystems of the correlator on a regular, or user-determined basis. The results of such tests are analyzed and stored within a database, leaving an indication of what correlator modules, or sub-modules are not in currently working order, or are not behaving as expected. This information will served be to various clients such as the CRM GUI, or the VciConfigMapper on request.
Copyright: National Research Council of Canada and Associated Universities Inc., 2010, 2011, 2012
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Nested Class Summary | |
|---|---|
static class |
Crm.CorrMode
Correlator Mode Enumeration |
static class |
Crm.CrmMode
CRMDb Server Mode Enumeration |
| Field Summary | |
|---|---|
protected static CrmBlfFileAnalyzer |
cbfa
|
protected static CrmBlbHSXmlConfig |
cbxc
|
protected static CrmDb |
cd
|
protected static CrmLagFrameReceiver |
clfr
|
protected static CrmCorrelatorModel |
cm
|
protected static java.lang.String |
configFileString
|
protected static java.lang.String |
configUrlString
|
protected static CrmDiagnosticQueue2 |
cq
|
protected static java.net.InetAddress |
crmHost
|
protected static java.lang.String |
crmHostString
|
protected static javax.xml.bind.JAXBContext |
crmJaxbContext
|
protected static java.net.DatagramSocket |
lfrSocket
|
protected static java.lang.Integer |
lfrSocketPort
|
protected static java.lang.String |
releaseString
|
| Constructor Summary | |
|---|---|
Crm()
The main constructor for the Crm object. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Receives an ActionEvent, determines the source and performs instructions accordingly. |
void |
addActionListener(java.awt.event.ActionListener listener)
Adds a listener to the action listener list within this class. |
static void |
addGuiHost(java.lang.String hostName)
Adds a hostname to the GUI hostname list |
static void |
addXmlTraffic(ca.nrc.widar.jaxb.crm.XmlTraffic xmlTraffic)
This method adds an XmlTraffic object to the xmlTrafficList buffer maintained by the CRM |
static void |
clearXmlTraffic()
Clears the current XmlTraffic buffer of all objects |
protected void |
fireActionEvent(java.awt.event.ActionEvent event)
Generates an action event for each class listed in the listener list, and calls the actionPerformed method in that class. |
static Crm.CorrMode |
getCorrMode()
Return the correlator mode |
static java.lang.String |
getCrmDescriptor()
Return the current CRM mode string description |
static Crm.CrmMode |
getCrmMode()
Return the current CRM mode variable |
static java.lang.String |
getDbInfoHtml()
Returns an HTML string indicating the status of the CrmDb Server |
static long |
getFreeMemory()
Returns a long integer containing the amount of free memory available within the CRM Java Virtual Machine (JVM) |
static java.util.ArrayList<java.lang.String> |
getGuiHostList()
Returns the GUI hostname list |
static java.lang.String |
getHostInfo()
|
static java.lang.String |
getLfrInfoHtml()
Returns an HTML string indicating the status of the LFR |
static java.lang.Integer |
getLfrPort()
Returns the Lag Frame Receiver port identifier |
static long |
getMaxMemory()
Returns a long integer containing the maximum amount of memory currently available to the CRM JVM |
static java.lang.String |
getModelInfoHtml()
Returns an HTML string indicating the status of the Correlator Model within the CRM Server |
static int |
getNumThreads()
Returns the current number of conturrent threads within the JVM |
static long |
getOpenFileDescriptorCount()
|
static java.lang.String |
getQueueInfoHtml()
Returns an HTML string indicating the status of the CRM Queue |
java.lang.String |
getReleaseInfo()
Obtains and returns the release info string for this instantiation of the CRM. |
static java.lang.String |
getReleaseString()
|
static java.util.Date |
getStartTime()
Returns to the caller the Date value indicating the instantiation time for this instance of the CRM Server |
static long |
getTotalMemory()
Returns a long integer containing the amount of total memory currently available to the CRM JVM |
static java.lang.String |
getUpTime()
Returns the instantiation time in String format |
static int |
getXmlTrafficCount()
Returns the number of XmlTraffic objects currently within the buffer |
static java.util.ArrayList |
getXmlTrafficList()
Returns a copy of the ArrayList containing the XmlTraffic buffer |
static boolean |
isBlbHSXmlConfigAlive()
|
static boolean |
isDbAlive()
Returns the basic operational state of the CRM Database server |
static boolean |
isDbMode()
Returns the DB Server mode flag |
static boolean |
isDebugMode()
Returns the Debug Mode flag |
static boolean |
isDiagMode()
Returns the Diagnostic mode flag |
static boolean |
isDiagQueueAlive()
Returns the basic operational status of the Diagnostic Queue |
static boolean |
isGuiHost(java.lang.String hostName)
Returns a boolean indicating whether or not the supplied GUI hostName is included in the CRM GUI Host list |
static boolean |
isLfrAlive()
Returns the basic operational status of the Lag Frame Receiver. |
static boolean |
isLfrSocketOpen()
Returns the basic operational status of the Lag Frame Receiver Socket |
static boolean |
isXmlMonitorMode()
Returns the xmlMonitorMode flag |
protected static void |
killDb()
Interrupts and kills the database connection thread. |
protected static void |
killDiagQueue()
Interrupts and kills the Diagnostic Queue. |
protected static void |
killLfr()
Interrupts and kills the current Lag Frame Receiver thread and closes the socket. |
static void |
lfrRegisterDiagnostic(CrmDiagnostic d)
Registers a Diagnostic object with the LFR. |
static void |
main(java.lang.String[] args)
The Main method |
protected static ca.nrc.widar.jaxb.crm.XmlTraffic |
newXmlTraffic(ca.nrc.widar.jaxb.crm.XmlTraffic tXml,
java.lang.String destIp,
java.lang.String destContext,
java.lang.String className,
java.lang.String methodName,
java.lang.Boolean safeMode,
java.lang.String text)
Creates and returns a new XmlTraffic JAXB object populated with the specified parameters |
void |
removeActionListener(java.awt.event.ActionListener listener)
Removes a listener from the action listener list within this class. |
static void |
removeGuiHost(java.lang.String hostName)
Removes a hostname from the GUI hostname list |
static void |
setDebugMode(boolean mode)
Sets the Debug Mode status to the provided value |
static void |
setXmlMonitorMode(boolean mode)
Sets the xmlMonitorMode status to the provided value |
static void |
showMemoryUsage(java.lang.String className)
Prints a memory usage summary (including thread count) to the console |
static void |
showThreadSummary()
Prints a Thread Summary to the console |
protected void |
startCorrelatorModel()
Instantiates a Correlator Model to be used by the CRM Server |
protected static void |
startDb(ca.nrc.widar.jaxb.crm.CrmDbInfo cdiXml)
Instantiates the CRM Database server if it has not already happened. |
protected static void |
startDiagQueue()
Starts the CrmDiagnosticQueue |
protected static void |
startHttpServer()
Initializes the HTTP server to listen at the specified port number |
protected static void |
startLfr(int port)
Starts the Lag Frame Receiver thread. |
protected static void |
startLfrSocket(int port)
Starts the Lag Frame Receiver Socket at the specified port |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static CrmDb cd
protected static CrmBlbHSXmlConfig cbxc
protected static CrmCorrelatorModel cm
protected static CrmDiagnosticQueue2 cq
protected static CrmLagFrameReceiver clfr
protected static CrmBlfFileAnalyzer cbfa
protected static javax.xml.bind.JAXBContext crmJaxbContext
protected static java.lang.String configFileString
protected static java.lang.String configUrlString
protected static java.lang.String crmHostString
protected static java.lang.String releaseString
protected static java.net.InetAddress crmHost
protected static java.net.DatagramSocket lfrSocket
protected static final java.lang.Integer lfrSocketPort
| Constructor Detail |
|---|
public Crm()
config - A string indicating a configuration mode that the Crm should be initialized
for. Currently, this can be either 'drao' or 'nrao' and is intended to
allow the Crm to determine where it is being run. This may be deprecated in
the near future.| Method Detail |
|---|
protected static void startHttpServer()
port - An integer port identifierpublic static java.lang.Integer getLfrPort()
protected static void startLfr(int port)
port - The integer port number for the LFR.protected static void startLfrSocket(int port)
port - The integer port number for the socket.protected static void killLfr()
protected void startCorrelatorModel()
model - The (optional) String filename of a correlator model if thta model
is to be obtained from a file, otherwise, null indicating that the
model is to be obtained by probing the Correlatorprotected static void startDiagQueue()
protected static void killDiagQueue()
protected static void startDb(ca.nrc.widar.jaxb.crm.CrmDbInfo cdiXml)
cdiXml - A CrmDbInfo object containing CrmDb parameters, or null if the
default parameters are to be used.protected static void killDb()
public static boolean isBlbHSXmlConfigAlive()
public static boolean isLfrAlive()
public static boolean isLfrSocketOpen()
public static boolean isDiagQueueAlive()
public static boolean isDbAlive()
public static boolean isDebugMode()
public static boolean isXmlMonitorMode()
public static Crm.CorrMode getCorrMode()
public static Crm.CrmMode getCrmMode()
public static java.lang.String getCrmDescriptor()
public static boolean isDbMode()
public static boolean isDiagMode()
public static void setDebugMode(boolean mode)
mode - The new debug statepublic static void setXmlMonitorMode(boolean mode)
mode - The new xmlMonitorMode statepublic static java.util.Date getStartTime()
public static java.lang.String getUpTime()
public java.lang.String getReleaseInfo()
public static java.lang.String getReleaseString()
public static java.lang.String getHostInfo()
public static java.lang.String getModelInfoHtml()
public static java.lang.String getQueueInfoHtml()
public static java.lang.String getLfrInfoHtml()
public static java.lang.String getDbInfoHtml()
public static void lfrRegisterDiagnostic(CrmDiagnostic d)
throws java.lang.Exception
java.lang.Exceptiond - A valid, initialized CrmDiagnostic objectpublic static void addXmlTraffic(ca.nrc.widar.jaxb.crm.XmlTraffic xmlTraffic)
xmlTraffic - An XmlTraffic objectpublic static java.util.ArrayList getXmlTrafficList()
public static int getXmlTrafficCount()
public static void clearXmlTraffic()
protected static ca.nrc.widar.jaxb.crm.XmlTraffic newXmlTraffic(ca.nrc.widar.jaxb.crm.XmlTraffic tXml,
java.lang.String destIp,
java.lang.String destContext,
java.lang.String className,
java.lang.String methodName,
java.lang.Boolean safeMode,
java.lang.String text)
tXml - An empty XmlTraffic objectdestIp - The destination IP stringdestContext - A string describing the context of the destination applicationclassName - A string representation of the classname (originating class)methodName - A string representation of the method name (originating method)text - The text of the xml traffic
public static void addGuiHost(java.lang.String hostName)
hostName - A String including the hostName of a GUI that is currently
connected to the CRMpublic static void removeGuiHost(java.lang.String hostName)
hostName - A String including the hostName of a GUI that is to be
removed from the CRM GUI HostName listpublic static boolean isGuiHost(java.lang.String hostName)
hostName - A String including the hostName of the GUI that is to be
checked against the current GUI host list
public static java.util.ArrayList<java.lang.String> getGuiHostList()
public static long getOpenFileDescriptorCount()
public static long getFreeMemory()
public static long getTotalMemory()
public static long getMaxMemory()
public static int getNumThreads()
public static void showThreadSummary()
public static void showMemoryUsage(java.lang.String className)
public void addActionListener(java.awt.event.ActionListener listener)
listener - The class being added to the listener list.public void removeActionListener(java.awt.event.ActionListener listener)
listener - The class being removed from the listener list.protected void fireActionEvent(java.awt.event.ActionEvent event)
event - The event being fired.public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed in interface java.awt.event.ActionListenerevent - The incoming action event.public static void main(java.lang.String[] args)
args - The String array containing any arguments
|
NRAO/DRAO | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||