|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.AblePreferences
The AblePreferences class contains preferences for the base Able classes, including:
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 comm port used by ABLE platform code. |
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()
Indicates if the ABLE platform should use special secure methods or run completely open. |
java.lang.String |
getSocketFactoryClass()
Returns the fully qualified class name of the socket factory used by ABLE platform code; for example "com.ibm.able.AbleSocketFactory". |
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 working directory. |
boolean |
isSecure()
Indicates if the ABLE platform should use special secure methods or run completely open. |
void |
readPropertiesFile()
Load up the current set of working preferences from a physical properties file. |
void |
setCommPort(java.lang.String theValue)
Sets the comm port used by ABLE platform code. |
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 |
setSocketFactoryClass(java.lang.String theValue)
Sets the fully qualified class name of the socket factory used by ABLE platform code; for example "com.ibm.able.AbleSocketFactory". |
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 working directory. |
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. If there is no properties file in either location, a default properties file is created.
Method Detail |
public final java.lang.String getWorkingDirectory()
user.home
.public final void setWorkingDirectory(java.lang.String theValue)
theValue
- The current working directory.public final long getTraceLogConsoleLevel()
AbleTraceLogger.TraceLogLevelValuesVector
list.public final void setTraceLogConsoleLevel(long 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 java.lang.String getCommPort()
Default value: an empty string.
public final void setCommPort(java.lang.String theValue)
Default value: an empty string.
theValue
- The comm port; ; for example ":1234".public final java.lang.String getSocketFactoryClass()
Default value: an empty string.
public final void setSocketFactoryClass(java.lang.String theValue)
Default value: an empty string.
theValue
- The class name of the socket factory.public final boolean getSecurity()
Default value: off. Can be set only by manually editing the able.preferences file before startup.
true
indicates security is on, and
false
indicates security is off.public final boolean isSecure()
Default value: off. Can be set only by manually editing the able.preferences file before startup.
true
indicates security is on, and
false
indicates security is off.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.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |