Configuration Attributes

All of the attributes that can be used to modify the behaviour of the SL4B library are defined here. They have been broken down into sections according to the area of the library to which they apply, whilst an index of all the attributes have also been included.


Contents


Common Attributes

These are the attributes that are most commonly used to configure SL4B.

Attribute Default Description
commondomain   Specifies the common domain shared by the SL4B-enabled page, the Liberator and (if in use) the keymasterurl property. Supposing the following URLs were being used:
  • http://www.example.com/ (the SL4B enabled page)
  • http://liberator.example.com/ (the Liberator)
  • http://keymaster.example.com/ (the KeyMaster)
Then, the commondomain would need to be set to 'example.com'. Please see JavaScript Security (document.domain Issues) for more information on when this attribute should be used.
configurationfile   Specifies the URL of the JavaScript configuration file.
debug SL4B_DebugLevel.CRITICAL The debug level that has been configured for the SL4B library. The levels, in order of importance, are:
  • SL4B_DebugLevel.CRITICAL (critical)
  • SL4B_DebugLevel.ERROR (error)
  • SL4B_DebugLevel.NOTIFY (notify)
  • SL4B_DebugLevel.WARN (warn)
  • SL4B_DebugLevel.INFO (info)
  • SL4B_DebugLevel.DEBUG (debug)
  • SL4B_DebugLevel.RTTP_FINE (rttp-fine)
  • SL4B_DebugLevel.RTTP_FINER (rttp-finer)
  • SL4B_DebugLevel.RTTP_FINEST (rttp-finest)
Use the text in brackets to set the debug level on the SL4B script tag, e.g.
<script type="text/javascript" id="sl4b" debug="info" ></script>
password demopass The password to be used to login to the Liberator.
See the credentialsprovider attribute for more information.
rttpprovider javascript The name of the RTTP Provider that will be used to provide access to the Liberator.
The possible values are:
  • applet (default)
  • javascript
  • test
Any other values will be handled as a URL that will be loaded to create a custom RTTP provider.
Note: The default prior to SL4B version 4.3 was applet.
serverurl   The root URL of the Liberator (e.g. http://liberator.example.com:8080).
user demouser The username to be used to login to the Liberator.
See the credentialsprovider attribute for more information.

Back to contents


JavaScript RTTP Provider Attributes

These attributes configure the behaviour of the JavaScript RTTP provider. They will be ignored if a different provider is used.

Attribute Default Description
connectiontimeout 15000 The length of time, in millisecond, the JavaScript RTTP provider will wait for a particular connection to be established, before it fails over to the next connection type.
Note: The default prior to SL4B version 4.3 was 5000.
jscontainerpath sl4b/javascript-rttp-provider The path to the JavaScript container directory on the Liberator.
jscontainerurl (deprecated) [serverurl]/[jscontainerpath] The URL of the JavaScript container directory on the Liberator.
maxgetlength 128 The maximum length of a message for it to be sent to the Liberator via an HTTP GET. If a message is longer than this value then it will be sent via an HTTP POST. This value should be set to zero if HTTP POST should always be used to send messages to the Liberator.
type3pollperiod 1000 The length of time between polls for the next batch of updates from the Liberator for a type 3 (refresh) connection.
type5reconnectcount 10000 The number of messages that will be processed before the library triggers an automatic reconnection to the Liberator. This only applies for type 5 connection, and is necessary to prevent memory leaks in IE.
type5padlength 4096 The number of bytes to pad the streaming JavaScript file to ensure streaming starts correctly. This only applies for type 5 connection, and is required in IE.
noopinterval 5000 The length of time, in milliseconds, between heartbeat (NOOP) messages sent to the Liberator to test connectivity.
nooptimeout 5000 The length of time, in milliseconds, to wait for a response to a heartbeat (NOOP) message before assuming we've lost the connection to the Liberator.

Back to contents


Applet RTTP Provider Attributes

These attributes configure the behaviour of the applet RTTP provider. They will be ignored if a different provider is used.

Attribute Default Description
appletchecktimeout 15000 The length of time, in milliseconds, to wait for AppletCheck to load.
appletjar applet.jar The name of the JAR file that contains the RTTP Applet.
appletpath applet The path of the RTTP Applet on the Liberator.
appleturl (deprecated) [serverurl]/[appletpath] The URL of the RTTP Applet.
discarddelay 10 This attribute is used to set a delay time (in seconds) for which the RTTP applet will wait before it discards removed objects within an SL4B page. This is particularly useful if navigating between multiple SL4B pages within a frameset, as the RTTP applet will no longer have to rerequest objects that were already loaded in the previous page.
gcfreq 200 The number of updates the RTTP applet will process before forcing a garbage collection. This is only used if the rttpprovider configuration attribute is omitted, or is explicitly defined as applet.
gcfreqms   Overrides the value of the gcfreq configuration attribute when the RTTP applet is running within the Microsoft JVM.
gcfreqsun   Overrides the value of the gcfreq configuration attribute when the RTTP applet is running within the Sun JVM.
logoutdelay 1 The number of seconds to delay logging out of Liberator after the SL4B page has been unloaded. This attribute is used to set a delay time (in seconds) for logging out of the RTTP applet after the SL4B page has been unloaded. This is particularly useful if navigating between multiple SL4B pages within a frameset, as the RTTP applet will no longer have to disconnect and reconnect between each link.
multiupdates false Determines if the users RTTP source supports multiple updates. It is more efficient to send multiple updates than to send each individual update.
true if the user RTTP source supports multiple updates.
nostalenotify false Determines whether the user wants to suppress all source status message. It should be used if the user wants to suppress all of the source status messages that are generated when a connection is lost, or connection is regained thereafter.
true if the user wants to suppress the messages, i.e. the attribute was present in the SL4B script tag.
objectnamedelimiter single space The character(s) that will be used to to separate symbols. This is case-sensitive.
rttpapplettimeout 120000 The length of time, in milliseconds, to wait for the RTTP applet to load.
rttpdebuglevel critical The debug level that will be used by the RTTP applet to log debug messages:
  • SL4B_DebugLevel.CRITICAL (critical)
  • SL4B_DebugLevel.ERROR (error)
  • SL4B_DebugLevel.NOTIFY (notify)
  • SL4B_DebugLevel.WARN (warn)
  • SL4B_DebugLevel.INFO (info)
  • SL4B_DebugLevel.DEBUG (debug)
  • SL4B_DebugLevel.RTTP_FINE (rttp-fine)
  • SL4B_DebugLevel.RTTP_FINER (rttp-finer)
  • SL4B_DebugLevel.RTTP_FINEST (rttp-finest)
Use the text in brackets to set the debug level on the SL4B script tag, e.g.
<script type="text/javascript" id="sl4b" rttpdebugdebug="info" ></script>
statsinterval 5 The number of seconds between noops.
statsreset 5000 The interval (in milliseconds) to reset the statistics that are generated for the connectivity between the Liberator and client. The time and bytes information relayed in the connectivity statistics callback are cumulative values which are reset to 0 after a certain interval.
statstimeout 30000 The length of time (in milliseconds) to wait before telling the user the connection to the Liberator has been lost. This attribute is used to set the period of time after which a connection error of "Request Timeout" will be reported back to the browsers status bar, should the connectivity statistics not be returned by the Caplin Liberator.

Back to contents


Master/Slave Frame Attributes

These attributes apply to the master/slave frame functionality (see Using Multiple Frames in SL4B API documentation for more details).

Attribute Default Description
containerframelocation top The location of the common container frame (relative to this frame) which is the root parent from which all the master and slave frames are children.
frameid   The string that will be used to uniquely identify a slave frame. For backward compatibility the value of the thisframe attribute will be used if this attribute is omitted.
thisframe (deprecated)   The location of the web page within the DOM. The frameid attribute should be used instead.
usemasterframe   Unary attribute that indicates that the frame is a slave. For backwards compatibility with RTML and RTSL, is a value is specified, it is used as the location of the master frame within the DOM.

Back to contents


Latency Attributes

These are the attributes that are used for calculating message latency.

Attribute Default Description
enablelatency false Enables calculation of actual update event latency.
clocksyncbatchsize 5 The number of clock sync messages to send in a batch, the actual clocksync offset is calculated from the message with the shortest round trip time.
clocksyncperiod 60000 The spacing in milliseconds between clock sync batches
clocksyncspacing 1000 The spacing in milliseconds between each batch of clocksync messages. To determin the clock sync a series of messages (a batch) are sent to the server, for each message the round trip time is calculated, the message with the best round trip time is then used to calculate the clock offset between the two machines. The clock offset is used to adjust timestamps sent from the server to calculate latency until the next clock sync is calculated. Using the default values a batch of 5 (clocksyncbatchsize) clocksync messages are sent with 1000ms (clocksyncspacing) between each, the the calculated clock offset is then used for calculating the latency for all messages for the next 60000ms (clocksyncperiod).
timestampfield INITIAL_TIMESTAMP The name of the field used to retrieve the servers timestamp at the time the message was sent, used in conjuction with the clocksync offset to calculate the actual message latency.

Back to contents


Other Attributes

These are the remaining attributes that do not fit specifically into any other category.

Attribute Default Description
applicationid SL4B The page specific application id that will be sent to the Liberator when the page attempts to login. If this attribute is defined, the value that is sent to the Liberator will always be prefixed with SL4B:.
connectiontypes 2, 3 (for an applet RTTP provider)
5, 3 (for a JavaScript RTTP provider)
A comma separated list of the types of connection that SL4B will attempt to use to connect to a Liberator. The possible connection types are listed below, in addition to any limitations:
  • 1 = a direct socket connection (applet RTTP provider only; only likely to work if the clients are connecting to a Liberator over an intranet)
  • 2 = a tunnelled http connection (applet RTTP provider only)
  • 3 = a polling connection
  • 5 = a streaming javascript connection (JavaScript RTTP provider only)
credentialsprovider standard The name of the credentials provider that will be used to get the username and password that SL4B will use to login to the Liberator.
The possible values are:
  • standard (default) - the values of the username and password attributes are used
  • keymaster - the keymasterurl attribute is used to obtain the username and password from KeyMaster
Any other values will be handled as a URL that will be loaded to create a custom credentials provider.
debugwindowtype html The type of window that will be opened to display the SL4B debug log. There are two options:
  • html - opens an HTML page hosted from the server that SL4B was loaded from to display the debug log. This avoid any secure/non-secure warnings when using debugging within a page loaded over https.
  • about:blank - opens a window containing about:blank and writes the debug log messages into it. This option is most suitable if the applet RTTP provider is used within a page with the standard credentials provider and the commondomain attribute has not been set.
enableflash false true if the flash extension library should be loaded (see Using The Flash Library for more details).
includertml false Whether the RTML library scripts should be loaded or not.
includertsl false Whether the RTSL library scripts should be loaded or not.
keymasterconnectiontimeout 10000 The timeout (in milliseconds) that will be used for keymaster connections.
keymasterkeepaliveinterval 30000 The interval (in milliseconds) between keymaster keep alive polls, used to keep the signon session open. If a non positive value is specified, the KeyMaster keep alive functionality will be disabled.
keymasterurl   The location of a KeyMaster to use for authentication. The attribute is used if signature generation is required for the login details for the RTTP session. The value should represent the URL of a Caplin KeyMaster, and the protocol (http or https) must be the same as used for the main SL4B enabled page.
See the credentialsprovider attribute for more information.
maxupdatebatchsize 5000 The maximum number of update callbacks that will be processed within a single batch. This can be used to configure how much "breathing space" the browser has when high update rates are being received.
nobrowserstatus false Determines if the user wishes to suppress RTTP messages being displayed in the status bar relating to the RTTP session. If the attribute is present in the SL4B script tag then these messages will be suppressed and not appear.
true if the user wants to suppress all messages related to the RTTP session.
service   The URL of the XML file containing the failover algorithm and servers information.
updatebatchfreq 250 (or 0 if a JavaScript RTTP Provider is configured) The number of milliseconds between each batch of callbacks (typically object updates) being sent. This value can be decreased to reduce the latency of the updates, however this may decrease the performance of the browser, depending on how high the update rate is and how powerful the client PC is.

If a JavaScript RTTP Provider is used, the value of this attribute is 0 and cannot be changed.
enableautoloading true Determines if the user wishes to invoke SL4B load/beforeunload functions automatically.
The SL4B load function sets up the SL4B environment on application start-up whilst the Sl4B beforeunload function is used to clean-up the SL4B on exiting the application.
If a user wishes to invoke the SLB load/beforeunload functions manually using SL4B_WindowEventHandler.onLoad(evt) and SL4B_WindowEventHandler.onBeforeUnload(evt) respectively , enableautoloading must be set to false.

Back to contents


Attribute Index

Back to contents