|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.able.AblePreferences
The AblePreferences class contains preferences for the base Able classes. The preferences include:
The actual preferences file that is read and written is located in the directory specified by the "able.prefdir" system property when the Able class is loaded.
An example preferences file is located at in the ABL product directory.
| Constructor Summary | |
|---|---|
AblePreferences()
Instantiate all preferences from a Properties file read from disk. |
|
| Method Summary | |
|---|---|
java.lang.String |
getCommPort()
Returns the current value of the CommPort property. |
long |
getMessageLogConsoleSeverity()
Returns the preference for the severity of the message logger's console handler. |
boolean |
getMessageLogDailyFile()
Indicates a preference for daily message log files. |
java.lang.String |
getMessageLogFileName()
Returns the path and name for the message log file handler. |
long |
getMessageLogFileSeverity()
Returns the preference for the severity of the message logger's file handler. |
boolean |
getSecurity()
Returns the current value of the Security property. |
java.lang.String |
getSmtpRelay()
Returns the current value of the SMTP relay property. |
java.lang.String |
getSocketFactoryClass()
Returns the current value of the Socket Factory Class property. |
long |
getTraceLogConsoleLevel()
Returns the preference for the level of the trace logger's console handler. |
boolean |
getTraceLogDailyFile()
Indicates a preference for daily trace log files. |
long |
getTraceLogFileLevel()
Returns the preference for the level of the trace logger's file handler. |
java.lang.String |
getTraceLogFileName()
Returns the path and name for the trace log file handler. |
java.lang.String |
getWorkingDirectory()
Returns the current value of the working directory property. |
boolean |
isSecure()
Returns the current value of the Security property. |
void |
readPropertiesFile()
Load up the current set of working preferences from a physical properties file. |
void |
setCommPort(java.lang.String theValue)
Sets the current value of the CommPort property. |
void |
setMessageLogConsoleSeverity(long theValue)
Sets the preference for the severity of the message logger's console handler. |
void |
setMessageLogDailyFile(boolean theValue)
Sets the preference for daily message log files. |
void |
setMessageLogFileName(java.lang.String fileName)
Sets the path and name for the message log file handler. |
void |
setMessageLogFileSeverity(long theValue)
Sets the preference for the severity of the message logger's file handler. |
void |
setSmtpRelay(java.lang.String theValue)
Sets the current value of the SMTP relay property. |
void |
setSocketFactoryClass(java.lang.String theValue)
Sets the current value of the Socket Factory Class property. |
void |
setTraceLogConsoleLevel(long theValue)
Sets the preference for the level of the trace logger's console handler. |
void |
setTraceLogDailyFile(boolean theValue)
Sets the preference for daily trace log files. |
void |
setTraceLogFileLevel(long theValue)
Sets the preference for the level of the trace logger's file handler. |
void |
setTraceLogFileName(java.lang.String fileName)
Sets the path and name for the trace log file handler. |
void |
setWorkingDirectory(java.lang.String theValue)
Sets the current value of the Working Directory property. |
void |
updatePreferenceVariablesAndWritePropertiesFile(AblePreferences theNewPreferences)
Change all current working preferences, except Security (which shall not be set programmtically), to the values contained in the specified preferences object. |
void |
writePropertiesFile()
Save the current set of working preferences to a physical properties file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AblePreferences()
We look for this package's properties file first in the
directory as specified by the system property contained in the
variable Able.PropertiesFileDirectoryProperty and if
the named property isn't set, then in the user's home directory
(as contained in the Java system property user.home.
If there is no properties file in either location, a default
properties file is created.
| Method Detail |
public final void setWorkingDirectory(java.lang.String theValue)
This property specifies which directory ABLE should use for storing its work files.
The default initial value of this property is the value of
the user.home system property.
theValue - The fully qualified name of a directory. null is
not an acceptable value and will cause errors.getWorkingDirectory()public final java.lang.String getWorkingDirectory()
user.home.setWorkingDirectory(String)public final long getTraceLogConsoleLevel()
AbleTraceLogger.TraceLogLevelValuesVector list.public final void setTraceLogConsoleLevel(long theValue)
theValue - The current level of the console handler, a value from the
AbleTraceLogger.TraceLogLevelValuesVector list.public final long getTraceLogFileLevel()
AbleTraceLogger.TraceLogLevelValuesVector list.public final void setTraceLogFileLevel(long theValue)
theValue - The current level of the file handler, a value from the
AbleTraceLogger.TraceLogLevelValuesVector list.public boolean getTraceLogDailyFile()
true if a datestamp is to precede the extension in the filename, and a new file
is to be created for each day.public void setTraceLogDailyFile(boolean theValue)
theValue - true if a datestamp is to precede the extension in the filename, and a new file
is to be created for each day.public final java.lang.String getTraceLogFileName()
getTraceLogDailyFile() is true,
a datestamp will precede the extension.
public final void setTraceLogFileName(java.lang.String fileName)
getTraceLogDailyFile() is true,
a datestamp will precede the extension.
fileName - The path and name for the trace log file.public final long getMessageLogConsoleSeverity()
AbleTraceLogger.MessageLogSeverityValuesVector list.public final void setMessageLogConsoleSeverity(long theValue)
theValue - The current severity of the console handler, a value from the
AbleTraceLogger.MessageLogSeverityValuesVector list.public final long getMessageLogFileSeverity()
AbleTraceLogger.MessageLogSeverityValuesVector list.public final void setMessageLogFileSeverity(long theValue)
theValue - The current severity of the file handler, a value from the
AbleTraceLogger.MessageLogSeverityValuesVector list.public final java.lang.String getMessageLogFileName()
getMessageLogDailyFile() is true,
a datestamp will precede the extension.
public final void setMessageLogFileName(java.lang.String fileName)
getMessageLogDailyFile() is true,
a datestamp will precede the extension.
fileName - The path and name for the trace log file.public boolean getMessageLogDailyFile()
true if a datestamp is to precede the
extension in the filename, and a new file is to be created for
each day.public void setMessageLogDailyFile(boolean theValue)
theValue - true if a datestamp is to precede the
extension in the filename, and a new file is to be created
for each day.public final void setCommPort(java.lang.String theValue)
This property specifies which communications port ABLE code is to use.
The default initial value of this property is the empty string, which means that ABLE uses the default RMI port.
theValue - A port number, preceded by a colon. For example,
":1234". May also be the empty string, as described
above, but null is not an acceptable value and
will cause errors.getCommPort()public final java.lang.String getCommPort()
setCommPort(String)public final void setSocketFactoryClass(java.lang.String theValue)
This property specifies which socket factory ABLE code is to use.
The default initial value of this property is the empty string, which means that ABLE uses the default RMI socket factory.
theValue - The fully qualified class name of a socket factory or the
empty string. null is not an acceptable value and
will cause errors.getSocketFactoryClass()public final java.lang.String getSocketFactoryClass()
setSocketFactoryClass(String)public final boolean getSecurity()
The default initial value of this property is false, which means that ABLE runs without security checking.
When set to true, ABLE uses special methods that require a security key so that the caller's identity can be verified before the operation is carried out.
There is no corresponding setSecurity(boolean)
method because this would allow the platform's security setting
to be changed by any arbitrary code introduced into the system.
The value of the Security property can be set in only one
way: by manually editing the able.preferences file
before starting the ABLE platform. Once the platform is started,
the security setting cannot be altered.
public final boolean isSecure()
getSecurity()public final void setSmtpRelay(java.lang.String theValue)
This property allows ABLE code to send e-mail through the network using the specified relay. It may be used, for example, by a user-written diagnostic agent to send alerts to specific recipients.
The default initial value of this property is the empty string, which prevents ABLE from sending any e-mail.
theValue - The new value of the SMTP relay property, which must be
either the fully qualified name of an SMTP relay host on the
network or the empty string. The latter prevents ABLE
from sending e-mail. null is not an acceptable
value and will cause errors.getSmtpRelay()public final java.lang.String getSmtpRelay()
setSmtpRelay(String)public void readPropertiesFile()
writePropertiesFile()public void writePropertiesFile()
readPropertiesFile()public void updatePreferenceVariablesAndWritePropertiesFile(AblePreferences theNewPreferences)
theNewPreferences - A preferences object containing replacement
values for the current set of working preferences.
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||