|
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.CrmComm
public class CrmComm
WIDAR/EVLA - CRM: CrmComm Class
The CRM HTTP Comm(unications).
A class which contains communication utility methods for the CRM.
Copyright: National Research Council of Canada and Associated Universities Inc., 2010, 2011, 2012
![]() |
![]() |
Nested Class Summary | |
---|---|
static class |
CrmComm.SmallDataReadyListener
A utilitiy sub-class used as a bare bones DataReadyListener for the methods within the CrmComm class. |
Field Summary | |
---|---|
static java.lang.String |
CLASSNAME
|
static CrmComm.SmallDataReadyListener |
drl
|
static int |
SERVER_DEFAULT_TIMEOUT
|
Constructor Summary | |
---|---|
CrmComm()
A class containing a collection of static XML communication methods intended to facilitate communication between the CRM and WIDAR hardware components. |
Method Summary | |
---|---|
static java.net.InetAddress |
getLocalInetAddress()
Returns the InetAddress for the local host (CRM) |
static void |
sendGet(java.net.InetAddress host,
int port,
java.lang.String context,
java.lang.String command,
DataReadyListener drl)
a sendGet convenience method, allowing the caller to not require specifying the timeout value and defaulting to the SERVER_DEFAULT_TIMEOUT |
static void |
sendGet(java.net.InetAddress host,
int port,
java.lang.String context,
java.lang.String command,
DataReadyListener drl,
int timeout)
Sends the supplied message String as an asynchronous server 'GET' query to the specified server. |
static void |
sendPost(java.net.InetAddress host,
int port,
java.lang.String context,
java.lang.String message,
DataReadyListener drl)
a sendPost convenience method, allowing the caller to not require specifying the timeout value and defaulting to the SERVER_DEFAULT_TIMEOUT |
static void |
sendPost(java.net.InetAddress host,
int port,
java.lang.String context,
java.lang.String message,
DataReadyListener drl,
int timeout)
Sends the supplied message String as an asynchronous server 'POST' query to the specified server. |
static java.lang.String |
verifyCmibHost(java.lang.String hostName)
Supplied with a String hostname, this method attempts to verify the existence of a CMIB hostname by sending a generic SUPERVISOR XML request. |
static java.net.InetAddress |
verifyHost(java.lang.String hostName)
Supplied with a String hostname, this method attempts to verify the existence of the hostname via the 'isReachable' test with a 5 second timeout. |
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 CLASSNAME
public static final int SERVER_DEFAULT_TIMEOUT
public static CrmComm.SmallDataReadyListener drl
Constructor Detail |
---|
public CrmComm()
Method Detail |
---|
public static java.lang.String verifyCmibHost(java.lang.String hostName)
hostName
- A String representation of the CMIB host name to be tested
public static java.net.InetAddress verifyHost(java.lang.String hostName)
hostName
- A String representation of the host name to be tested
public static java.net.InetAddress getLocalInetAddress()
public static void sendGet(java.net.InetAddress host, int port, java.lang.String context, java.lang.String command, DataReadyListener drl)
host
- The InetAddress of the target hostport
- The integer port number of the target hostcontext
- The String context for the target host HTTP servercommand
- The String command to be sentdrl
- A reference to the DataReadyListener of the sender in order to properly direct the replypublic static void sendGet(java.net.InetAddress host, int port, java.lang.String context, java.lang.String command, DataReadyListener drl, int timeout)
host
- The InetAddress of the target hostport
- The integer port number of the target hostcontext
- The String context for the target host HTTP servercommand
- The String command to be sentdrl
- A reference to the DataReadyListener of the sender in order to properly direct the replytimeout
- The int number of milliseconds to wait for a replypublic static void sendPost(java.net.InetAddress host, int port, java.lang.String context, java.lang.String message, DataReadyListener drl)
host
- The InetAddress of the target hostport
- The integer port number of the target hostcontext
- The String context for the target host HTTP servermessage
- The String message to be sentdrl
- A reference to the DataReadyListener of the sender in order to properly direct the replypublic static void sendPost(java.net.InetAddress host, int port, java.lang.String context, java.lang.String message, DataReadyListener drl, int timeout)
host
- The InetAddress of the target hostport
- The integer port number of the target hostcontext
- The String context for the target host HTTP servermessage
- The String body of the message to be sentdrl
- A reference to the DataReadyListener of the sender in order to properly direct the replytimeout
- The int number of milliseconds to wait for a reply
|
NRAO/DRAO | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |