com.isti.quakewatch.util
Class QWConnProperties

java.lang.Object
  extended by com.isti.quakewatch.util.QWConnProperties

public class QWConnProperties
extends java.lang.Object

Class QWConnectionMgr manages the configuration property items for a connection to the QuakeWatch host.


Field Summary
 CfgPropItem alternateServersListProp
          List of alternate servers for fail-over reconnect.
 CfgPropItem altServersEnabledFlagProp
          Set true to enable fail-over reconnect to alternate servers.
 CfgPropItem callUpgradeAvailHoursProp
          # of hrs between calls to upgrade-avail call-back (0=never).
 CfgPropItem clientHostAddressProp
          Optional host address specification for this client.
 CfgPropItem clientPortNumProp
          Optional ORB/BOA port number specification for this client.
 CfgPropItem coaFileProp
          Certificate of Authority (CoA) file.
 CfgProperties configPropsObj
          Configuration-properties object; may be passed in.
 CfgPropItem connTimeoutSecProp
          Server connection-retry timeout in seconds (0=infinite).
 CfgPropItem crlFileProp
          certificate revocation list (CRL) file.
 CfgPropItem debugMissedMsgTestValueProp
          Debug-test value, ignore all but 1 out of given # of msgs.
static java.lang.String DEF_ALTSERVERS_LIST
          Default setting for alternate-servers list string.
static java.lang.String DEF_CERT_FILE
          Default setting for Certificate file.
static java.lang.String DEF_COA_FILE
          Default setting for Certificate of Authority (CoA) file.
static java.lang.String DEF_CRL_FILE
          Default setting for certificate revocation list (CRL) file.
static java.lang.String DEF_SERVER_HOSTADDR
          Default setting for server host address ("" == select alternate).
static int DEF_SERVER_PORTNUM
          Default setting for server port number.
protected  QWServerLoginInformation emptyServerLoginInfoObj
           
 CfgPropItem eventChLocFileProp
          Obsolete: Optional locator file for main event channel.
 CfgPropItem keepDefaultAltServersFlagProp
          Set true to allow only alternate servers specified in config.
 CfgPropItem lastUpgradeAvailTimeProp
          Timestamp of last time upgrade-avail call-back was called.
 CfgProperties localPropsObj
          Config-properties object containing only connection items.
 CfgPropItem loginInfoFileNameProp
          Optional filename of file holding server-login information.
 CfgPropItem maxConnRetryWaitMinutesProp
          Maximum wait between reconnect-to-server attempts (minutes).
 CfgPropItem maxServerAliveSecProp
          Max seconds to allow between server alive msgs (0=infinite).
 CfgPropItem maxServerEventAgeDaysProp
          Max age for events requested from server (days, 0=none).
 CfgPropItem processMessageWithoutSigFlagProp
          Process message without signature flag.
 CfgPropItem serverHostAddressProp
          Host address of QWServer to connect to.
 CfgPropItem serverLoginProp
          Server login username and password.
 CfgPropItem serverPortNumberProp
          Port number of QWServer to connect to.
 CfgPropItem statusCheckIntervalSecProp
          Seconds between calls to 'clientStatusCheck()' (0=disable).
 CfgPropItem subscribeDomainTypeListProp
          List of event domain and type names to subscribe to.
 CfgPropItem webServicesServerFlagProp
          Server connection is via web services flag.
 
Constructor Summary
QWConnProperties()
          Constructs a connection-properties manager object, using a newly- created configuration-properties object.
QWConnProperties(CfgProperties propsObj, java.lang.Object groupSelObj)
          Constructs a connection-properties manager object.
QWConnProperties(CfgProperties propsObj, java.lang.Object groupSelObj, boolean localEventAgePropFlag)
          Constructs a connection-properties manager object.
 
Method Summary
 CfgProperties getConfigProps()
          Returns the 'CfgProperties' object holding the configuration-property items.
 java.lang.String getItemsDisplayString()
          Returns a string containing a display of the names and values for the connection property items.
 java.lang.String getItemsDisplayString(java.lang.String equalsStr, java.lang.String newlineStr)
          Returns a string containing a display of the names and values for the connection property items.
 CfgProperties getLocalProps()
          Returns the 'CfgProperties' object holding the local configuration-property items (related to connection settings).
 CfgPropItem getMaxServerEventAgeDaysProp()
          Returns the local 'maxServerEventAgeDays' property item (if available).
static CfgPropItem getServerEventAgePropObj(java.lang.Object groupSelObj)
          Creates and returns a 'maxServerEventAgeDays' property item object.
 QWServerLoginInformation getServerLoginInfoObj()
          Returns the 'QWServerLoginInformation' object held by the "serverLogin" property item.
 java.beans.PropertyEditor getServerLoginPropertyEditor()
          Returns the login-dialog property editor for the 'QWServerLoginInformation' object held by the "serverLogin" property item.
 boolean isServerLoginInfoEmpty()
          Determines if the 'QWServerLoginInformation' object held by the "serverLogin" property item contains empty username and password strings.
 void setServerLoginInfoViaCfgProp(CfgPropItem itemObj)
          Fetches the 'QWServerLoginInformation' object from the given configuration-property item and enters it into the "serverLogin" property item.
 void setServerLoginPropertyEditor(java.beans.PropertyEditor propertyEditorObj)
          Enters the login-dialog property editor for the 'QWServerLoginInformation' object held by the "serverLogin" property item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEF_SERVER_HOSTADDR

public static final java.lang.String DEF_SERVER_HOSTADDR
Default setting for server host address ("" == select alternate).

See Also:
Constant Field Values

DEF_SERVER_PORTNUM

public static final int DEF_SERVER_PORTNUM
Default setting for server port number.

See Also:
Constant Field Values

DEF_ALTSERVERS_LIST

public static final java.lang.String DEF_ALTSERVERS_LIST
Default setting for alternate-servers list string.

See Also:
Constant Field Values

DEF_COA_FILE

public static final java.lang.String DEF_COA_FILE
Default setting for Certificate of Authority (CoA) file.

See Also:
Constant Field Values

DEF_CRL_FILE

public static final java.lang.String DEF_CRL_FILE
Default setting for certificate revocation list (CRL) file.

See Also:
Constant Field Values

DEF_CERT_FILE

public static final java.lang.String DEF_CERT_FILE
Default setting for Certificate file.

See Also:
Constant Field Values

emptyServerLoginInfoObj

protected QWServerLoginInformation emptyServerLoginInfoObj

configPropsObj

public final CfgProperties configPropsObj
Configuration-properties object; may be passed in.


localPropsObj

public final CfgProperties localPropsObj
Config-properties object containing only connection items.


serverHostAddressProp

public final CfgPropItem serverHostAddressProp
Host address of QWServer to connect to.


serverPortNumberProp

public final CfgPropItem serverPortNumberProp
Port number of QWServer to connect to.


serverLoginProp

public final CfgPropItem serverLoginProp
Server login username and password.


webServicesServerFlagProp

public final CfgPropItem webServicesServerFlagProp
Server connection is via web services flag.


maxServerAliveSecProp

public final CfgPropItem maxServerAliveSecProp
Max seconds to allow between server alive msgs (0=infinite).


connTimeoutSecProp

public final CfgPropItem connTimeoutSecProp
Server connection-retry timeout in seconds (0=infinite).


maxConnRetryWaitMinutesProp

public final CfgPropItem maxConnRetryWaitMinutesProp
Maximum wait between reconnect-to-server attempts (minutes).


altServersEnabledFlagProp

public final CfgPropItem altServersEnabledFlagProp
Set true to enable fail-over reconnect to alternate servers.


alternateServersListProp

public final CfgPropItem alternateServersListProp
List of alternate servers for fail-over reconnect.


keepDefaultAltServersFlagProp

public final CfgPropItem keepDefaultAltServersFlagProp
Set true to allow only alternate servers specified in config.


clientHostAddressProp

public final CfgPropItem clientHostAddressProp
Optional host address specification for this client.


clientPortNumProp

public final CfgPropItem clientPortNumProp
Optional ORB/BOA port number specification for this client.


subscribeDomainTypeListProp

public final CfgPropItem subscribeDomainTypeListProp
List of event domain and type names to subscribe to.


statusCheckIntervalSecProp

public final CfgPropItem statusCheckIntervalSecProp
Seconds between calls to 'clientStatusCheck()' (0=disable).


lastUpgradeAvailTimeProp

public final CfgPropItem lastUpgradeAvailTimeProp
Timestamp of last time upgrade-avail call-back was called.


callUpgradeAvailHoursProp

public final CfgPropItem callUpgradeAvailHoursProp
# of hrs between calls to upgrade-avail call-back (0=never).


loginInfoFileNameProp

public final CfgPropItem loginInfoFileNameProp
Optional filename of file holding server-login information.


coaFileProp

public final CfgPropItem coaFileProp
Certificate of Authority (CoA) file.


crlFileProp

public final CfgPropItem crlFileProp
certificate revocation list (CRL) file.


processMessageWithoutSigFlagProp

public final CfgPropItem processMessageWithoutSigFlagProp
Process message without signature flag.


debugMissedMsgTestValueProp

public final CfgPropItem debugMissedMsgTestValueProp
Debug-test value, ignore all but 1 out of given # of msgs.


maxServerEventAgeDaysProp

public final CfgPropItem maxServerEventAgeDaysProp
Max age for events requested from server (days, 0=none).


eventChLocFileProp

public final CfgPropItem eventChLocFileProp
Obsolete: Optional locator file for main event channel.

Constructor Detail

QWConnProperties

public QWConnProperties(CfgProperties propsObj,
                        java.lang.Object groupSelObj,
                        boolean localEventAgePropFlag)
Constructs a connection-properties manager object.

Parameters:
propsObj - the configuration-properties object to add item to, or null to create a new configuration-properties object.
groupSelObj - the configuration-group-selection object to use, or null for none.
localEventAgePropFlag - if true then a local 'maxServerEventAgeDays' property item is created and used.

QWConnProperties

public QWConnProperties(CfgProperties propsObj,
                        java.lang.Object groupSelObj)
Constructs a connection-properties manager object.

Parameters:
propsObj - the configuration-properties object to add item to, or null to create a new configuration-properties object.
groupSelObj - the configuration-group-selection object to use, or null for none.

QWConnProperties

public QWConnProperties()
Constructs a connection-properties manager object, using a newly- created configuration-properties object. A local 'maxServerEventAgeDays' property item is created and used.

Method Detail

getConfigProps

public CfgProperties getConfigProps()
Returns the 'CfgProperties' object holding the configuration-property items. If a 'CfgProperties' object parameter is passed in to the constructor then this method will return it.

Returns:
The 'CfgProperties' object holding the configuration-property items.

getLocalProps

public CfgProperties getLocalProps()
Returns the 'CfgProperties' object holding the local configuration-property items (related to connection settings).

Returns:
The 'CfgProperties' object holding the local configuration-property items (related to connection settings).

getServerLoginInfoObj

public QWServerLoginInformation getServerLoginInfoObj()
Returns the 'QWServerLoginInformation' object held by the "serverLogin" property item.

Returns:
The 'QWServerLoginInformation' object held by the "serverLogin" property item, or an empty 'QWServerLoginInformation' object if one could not be fetched.

isServerLoginInfoEmpty

public boolean isServerLoginInfoEmpty()
Determines if the 'QWServerLoginInformation' object held by the "serverLogin" property item contains empty username and password strings.

Returns:
true if the 'QWServerLoginInformation' object held by the "serverLogin" property item is empty; false if not.

setServerLoginInfoViaCfgProp

public void setServerLoginInfoViaCfgProp(CfgPropItem itemObj)
Fetches the 'QWServerLoginInformation' object from the given configuration-property item and enters it into the "serverLogin" property item.

Parameters:
itemObj - a configuration-property item holding a 'QWServerLoginInformation' object.

setServerLoginPropertyEditor

public void setServerLoginPropertyEditor(java.beans.PropertyEditor propertyEditorObj)
Enters the login-dialog property editor for the 'QWServerLoginInformation' object held by the "serverLogin" property item. GUI clients that want to be able to display the login dialog should call this method with "new LoginPropertyEditor()" as the parameter.

Parameters:
propertyEditorObj - the property-editor object to enter.

getServerLoginPropertyEditor

public java.beans.PropertyEditor getServerLoginPropertyEditor()
Returns the login-dialog property editor for the 'QWServerLoginInformation' object held by the "serverLogin" property item.

Returns:
The login-dialog property editor for the 'QWServerLoginInformation' object held by the "serverLogin" property item.

getItemsDisplayString

public java.lang.String getItemsDisplayString(java.lang.String equalsStr,
                                              java.lang.String newlineStr)
Returns a string containing a display of the names and values for the connection property items.

Parameters:
equalsStr - a String containing the characters to be placed between each name and value; or if null then the characters " = " will be used.
newlineStr - a String containing the characters to be used to separate items; or if null then the system default newline character(s) will be used.
Returns:
A string containing a display of the names and values for the connection property items.

getItemsDisplayString

public java.lang.String getItemsDisplayString()
Returns a string containing a display of the names and values for the connection property items.

Returns:
A string containing a display of the names and values for the connection property items.

getMaxServerEventAgeDaysProp

public CfgPropItem getMaxServerEventAgeDaysProp()
Returns the local 'maxServerEventAgeDays' property item (if available).

Returns:
The local 'maxServerEventAgeDays' property item, or null if not in use.

getServerEventAgePropObj

public static CfgPropItem getServerEventAgePropObj(java.lang.Object groupSelObj)
Creates and returns a 'maxServerEventAgeDays' property item object.

Parameters:
groupSelObj - the configuration-group-selection object to use, or null for none.
Returns:
A new 'maxServerEventAgeDays' property item object.