com.isti.quakewatch.common.qw_services
Interface QWServicesOperations

All Known Subinterfaces:
QWServices
All Known Implementing Classes:
_QWServicesStub, QWServicesPOA, QWServicesPOATie

public interface QWServicesOperations

Interface definition: QWServices.


Method Summary
 boolean clientStatusCheck(java.lang.String clientInfoStr)
          Determines the client-version status.
 void disconnectClient(java.lang.String clientInfoStr)
          Disconnects the client connection.
 java.lang.String getAltServersIdsListStr()
          Fetches the list of alternate server IDs (defined in the QWServer's configuration file).
 byte[] getCertificateFileData()
          Fetches a byte-array of certificate-file data.
 java.lang.String getClientUpgradeInfo(java.lang.String clientInfoStr)
          Fetches information about available client-program upgrades.
 java.lang.String getConnectionStatusMsg()
          Fetches a message string describing the status of the current connection to the server.
 int getConnectionStatusVal()
          Fetches a value indicating the status of the current connection to the server.
 java.lang.String getEventChLocStr()
          Fetches the locator string for the CORBA-event-channel.
 java.lang.String getRedirectedServerLoc()
          Fetches the location of the server that the client is being redirected to.
 java.lang.String getServerHostAddrStr()
          Fetches the host address string for this server.
 java.lang.String getServerIdNameStr()
          Fetches the server ID name string (defined in the QWServer's configuration file).
 java.lang.String getServerRevisionString()
          Fetches the revision string for this server.
 java.lang.String getStatusMsgTypeNameStr()
          Fetches the type-name string used on status messages sent out by the server.
 java.lang.String getStatusReportData()
          Fetches the latest status-report data from the server.
 long getStatusReportTime()
          Fetches the timestamp value for the latest status report from the server.
 void requestAliveMessage()
          Requests that a server-alive message be sent immediately.
 java.lang.String requestFilteredMessages(long timeVal, long msgNum, java.lang.String domainTypeListStr)
          Requests that messages newer or equal to the specified time value or later than the specified message number be returned.
 java.lang.String requestMessages(long timeVal, long msgNum)
          Requests that messages newer or equal to the specified time value or later than the specified message number be returned.
 java.lang.String requestSourcedFilteredMessages(long timeVal, java.lang.String hostMsgNumListStr, java.lang.String domainTypeListStr)
          Requests that messages corresponding to the given time value and list of feeder-data-source host-name/message-number entries be returned.
 java.lang.String requestSourcedMessages(long timeVal, java.lang.String hostMsgNumListStr)
          Requests that messages corresponding to the given time value and list of feeder-data-source host-name/message-number entries be returned.
 

Method Detail

getConnectionStatusVal

int getConnectionStatusVal()
Fetches a value indicating the status of the current connection to the server.

Returns:
One of the 'CS_' values.

getConnectionStatusMsg

java.lang.String getConnectionStatusMsg()
Fetches a message string describing the status of the current connection to the server.

Returns:
A message string describing the status of the current connection to the server.

getRedirectedServerLoc

java.lang.String getRedirectedServerLoc()
Fetches the location of the server that the client is being redirected to. The returned string may also be a comma-separated list of "hostAddr:portNum" entries.

Returns:
The redirect-server location(s) string in the form "hostAddr:portNum", or an empty string if the client is not being redirected.

getServerIdNameStr

java.lang.String getServerIdNameStr()
Fetches the server ID name string (defined in the QWServer's configuration file).

Returns:
The server ID name string.

getServerHostAddrStr

java.lang.String getServerHostAddrStr()
Fetches the host address string for this server.

Returns:
The host address string for this server.

getServerRevisionString

java.lang.String getServerRevisionString()
Fetches the revision string for this server.

Returns:
The revision string for this server.

getStatusMsgTypeNameStr

java.lang.String getStatusMsgTypeNameStr()
Fetches the type-name string used on status messages sent out by the server. When structured messages are enabled, status messages will be sent with the domain name "StatusMessage" and the type name set to this value. These names can be used on the client side to filter-in the status messages.

Returns:
The type-name string used on status messages sent out by the server (when structured messages are enabled).

getAltServersIdsListStr

java.lang.String getAltServersIdsListStr()
Fetches the list of alternate server IDs (defined in the QWServer's configuration file).

Returns:
The list of alternate server IDs, as a string in the form "hostAddr:portNum,hostAddr:portNum,...".

getEventChLocStr

java.lang.String getEventChLocStr()
Fetches the locator string for the CORBA-event-channel.

Returns:
The locator string, or an empty string if an error occurred.

requestAliveMessage

void requestAliveMessage()
Requests that a server-alive message be sent immediately.


requestMessages

java.lang.String requestMessages(long timeVal,
                                 long msgNum)
Requests that messages newer or equal to the specified time value or later than the specified message number be returned.

Parameters:
timeVal - the time-generated value for message associated with the given message number, or the requested time value to be used (milliseconds since 1/1/1970).
msgNum - the message number to use, or 0 or none.
Returns:
An XML-formatted string containing the messages, or an empty string if an error occurs.

requestFilteredMessages

java.lang.String requestFilteredMessages(long timeVal,
                                         long msgNum,
                                         java.lang.String domainTypeListStr)
Requests that messages newer or equal to the specified time value or later than the specified message number be returned. Only messages whose event domain and type names match the given list of domain and type names will be returned (unless the given list is an empty string).

Parameters:
timeVal - the time-generated value for message associated with the given message number, or the requested time value to be used (milliseconds since 1/1/1970).
msgNum - the message number to use, or 0 or none.
domainTypeListStr - a list string of event domain and type names in the format "domain:type,domain:type...", where occurrences of the ':' and ',' characters not meant as separators may be "quoted" by preceding them with the backslash ('\') character and list items missing the ':' character will be considered to specify only a domain name (the type name will be an empty string); or an empty string for none.
Returns:
An XML-formatted string containing the messages, or an empty string if an error occurs.

requestSourcedMessages

java.lang.String requestSourcedMessages(long timeVal,
                                        java.lang.String hostMsgNumListStr)
Requests that messages corresponding to the given time value and list of feeder-data-source host-name/message-number entries be returned.

Parameters:
timeVal - the time-generated value for message associated with the given message number, or the requested time value to be used (milliseconds since 1/1/1970).
hostMsgNumListStr - a list of feeder-data-source host-name/message-number entries in the form: "hostName"=msgNum,...
Returns:
An XML-formatted string containing the messages, or an empty string if an error occurs.

requestSourcedFilteredMessages

java.lang.String requestSourcedFilteredMessages(long timeVal,
                                                java.lang.String hostMsgNumListStr,
                                                java.lang.String domainTypeListStr)
Requests that messages corresponding to the given time value and list of feeder-data-source host-name/message-number entries be returned. Only messages whose event domain and type names match the given list of domain and type names will be returned (unless the given list is an empty string).

Parameters:
timeVal - the time-generated value for message associated with the given message number, or the requested time value to be used (milliseconds since 1/1/1970).
hostMsgNumListStr - a list of feeder-data-source host-name/message-number entries in the form: "hostName"=msgNum,...
domainTypeListStr - a list string of event domain and type names in the format "domain:type,domain:type...", where occurrences of the ':' and ',' characters not meant as separators may be "quoted" by preceding them with the backslash ('\') character and list items missing the ':' character will be considered to specify only a domain name (the type name will be an empty string); or an empty string for none.
Returns:
An XML-formatted string containing the messages, or an empty string if an error occurs.

clientStatusCheck

boolean clientStatusCheck(java.lang.String clientInfoStr)
Determines the client-version status. All clients will call this method on a periodical basis while they are connected.

Parameters:
clientInfoStr - the client-connection-information properties string to use.
Returns:
true if the an updated version of the client is available; false if not.

getClientUpgradeInfo

java.lang.String getClientUpgradeInfo(java.lang.String clientInfoStr)
Fetches information about available client-program upgrades.

Parameters:
clientInfoStr - the client-connection-information properties string to use.
Returns:
An XML-formatted string containing information about available client-program upgrades.

getStatusReportTime

long getStatusReportTime()
Fetches the timestamp value for the latest status report from the server.

Returns:
The timestamp value for the latest status report from the server, or 0 if no report is available.

getStatusReportData

java.lang.String getStatusReportData()
Fetches the latest status-report data from the server.

Returns:
A string containing the latest status-report data, or an empty string if no report is available.

getCertificateFileData

byte[] getCertificateFileData()
Fetches a byte-array of certificate-file data.

Returns:
A byte-array of certificate-file data, or a zero-length array if no data is available.

disconnectClient

void disconnectClient(java.lang.String clientInfoStr)
Disconnects the client connection.

Parameters:
clientInfoStr - the client-connection-information properties string for the client.