public class FTL
extends java.lang.Object
Programs use it to create Realm
and TibProperties
objects, and to set log levels.
Programs do not instantiate this class.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TIB_LOG_LEVEL_DEBUG
Debug -- output trace entries for all events (debug, verbose,
information, warning and severe events).
|
static java.lang.String |
TIB_LOG_LEVEL_INFO
Info -- output trace entries for information, warning
and severe events.
|
static java.lang.String |
TIB_LOG_LEVEL_OFF
Off -- disable all tracing.
|
static java.lang.String |
TIB_LOG_LEVEL_SEVERE
Severe -- output trace entries only for severe events.
|
static java.lang.String |
TIB_LOG_LEVEL_VERBOSE
Verbose -- output trace entries for verbose, information,
warning and severe events.
|
static java.lang.String |
TIB_LOG_LEVEL_WARN
Warn -- output trace entries for warning and severe
events.
|
Modifier and Type | Method and Description |
---|---|
static Realm |
connectToRealmServer(java.lang.String realmServerUrl,
java.lang.String appName,
TibProperties props)
Connect to a realm server, and create a realm object.
|
static TibProperties |
createProperties()
Create an empty property list object without any default values.
|
static java.lang.String |
getVersionInformation()
Version of the FTL Java client library (Java archive file).
|
static void |
setLogFiles(java.lang.String filePrefix,
long maxFileSize,
int maxFiles,
TibProperties properties)
Arrange rotating log files.
|
static void |
setLogHandler(LogHandler handler,
TibProperties properties)
Register a global log handler.
|
static void |
setLogLevel(java.lang.String level)
Set the FTL log trace level.
|
public static final java.lang.String TIB_LOG_LEVEL_OFF
setLogLevel
,
Constant Field Valuespublic static final java.lang.String TIB_LOG_LEVEL_SEVERE
setLogLevel
,
Constant Field Valuespublic static final java.lang.String TIB_LOG_LEVEL_WARN
setLogLevel
,
Constant Field Valuespublic static final java.lang.String TIB_LOG_LEVEL_INFO
setLogLevel
,
Constant Field Valuespublic static final java.lang.String TIB_LOG_LEVEL_VERBOSE
setLogLevel
,
Constant Field Valuespublic static final java.lang.String TIB_LOG_LEVEL_DEBUG
setLogLevel
,
Constant Field Valuespublic static TibProperties createProperties() throws FTLException
As a mechanism for configuring objects, some FTL creation calls accept a properties object, which contains paired property names and values.
FTLException
public static Realm connectToRealmServer(java.lang.String realmServerUrl, java.lang.String appName, TibProperties props) throws FTLException
The realm server defines information about endpoints, transports and formats, which lets applications communicate within a realm. The realm object is a local copy (within your program) of the subset of the realm information that pertains to your application.
Note: It is good practice that each application process maintain only one connection to each relevant realm server. Realm objects are thread-safe; you can safely use the same realm object in all the threads of an application program. Do not duplicate connections to the same realm server in several threads, which would duplicate the realm object.
realmServerUrl
- The call contacts the realm server at this URL.appName
- The call sends this application name to the realm server.
The server responds with an application-specific subset
of the realm information.
To use the default application, supply null
.props
- Properties configure interaction with the realm server.
Required for connecting to a secure realm server,
for authentication, and for fault tolerance.
Otherwise optional; to omit, supply null
.
On failure, this method returns null
.
FTLException
Realm.HTTPS_CONNECTION_USE_SPECIFIED_TRUST_FILE
,
Realm.HTTPS_CONNECTION_USE_SPECIFIED_TRUST_STRING
,
Realm.HTTPS_CONNECTION_TRUST_EVERYONE
public static void setLogLevel(java.lang.String level) throws FTLException
This call sets the global log trace level for low-level FTL internal calls.
For information about tuning the log level separately for individual elements, see the topic Log Levels in the book TIBCO FTL Development.
level
- The call sets the level to this value.FTLException
TIB_LOG_LEVEL_OFF
,
TIB_LOG_LEVEL_SEVERE
,
TIB_LOG_LEVEL_WARN
,
TIB_LOG_LEVEL_INFO
,
TIB_LOG_LEVEL_VERBOSE
,
TIB_LOG_LEVEL_DEBUG
public static void setLogFiles(java.lang.String filePrefix, long maxFileSize, int maxFiles, TibProperties properties) throws FTLException
The filename extension .0
indicates the current log file.
Rotation shifts each file by incrementing its numeric extension.
If the number of files would exceed the maximum,
rotation deletes the oldest file.
filePrefix
- All log files begin with this filename prefix.maxFileSize
- FTL rotates the log files when the current log file
exceeds this limit (in bytes).
This value must be greater than 102400 (100 kilobytes).maxFiles
- FTL limits the number of log files to this maximum.properties
- Reserved for future use.
To ensure forward compatibility, programmers must supply null.FTLException
public static void setLogHandler(LogHandler handler, TibProperties properties) throws FTLException
If you register a log handler (at most one), then FTL directs all log statements to that handler.
handler
- FTL invokes this handler to process all log statements.properties
- Reserved for future use.
To ensure forward compatibility, programmers must supply null
.FTLException
public static java.lang.String getVersionInformation()
Programs can use this string to output the FTL version in a start banner or in debug output.