Caplin SL4B SDK 4.5.4

Class SL4B_JavaScriptRttpProvider

Object
   |
   +--SL4B_AbstractRttpProvider
         |
         +--SL4B_JavaScriptRttpProvider

class SL4B_JavaScriptRttpProvider
extends SL4B_AbstractRttpProvider


Implementation of the SL4B_AbstractRttpProvider base class that uses pure AJAX (JavaScript and DHMTL) techniques to communicate with the Liberator.

Limitations

A JavaScript RTTP provider will only work if the web server that hosts the SL4B-enabled web page and the Liberator the page connects to belong to the same domain (e.g. the web server www.example.com and the liberator liberator.example.com both belong to the domain example.com). These host names must be referred to within the web page. This restriction is necessary due to the JavaScript security module used by the browser.

If the SL4B library has not been loaded from the Liberator, or if it is not located within the root Liberator directory, it will be necessary to specify the jscontainerpath configuration attribute (see SL4B_Configuration.getJsContainerPath()) to use the JavaScript RTTP provider. This must define the directory that the container.html file is located within.


Field Summary
 Object super_stop
          
<static>  boolean bFramesCreatedFlag
          Flag to indicate whether the iframes have been created or not yet.
<static>  String const_REQUEST_FRAME_ID
          The identifier for the iframe used to establish the request channel with the Liberator.
<static>  String const_REQUEST_FRAME_URL
          The URL of the web page loaded from the Liberator that contains the XMLHttpRequest object that is used for the request channel.
<static>  String const_RESPONSE_FRAME_ID
          The identifier for the iframe used to establish the response channel with the Liberator.
<static>  String const_RESPONSE_FRAME_URL
          The URL of the web page loaded from the Liberator that contains the XMLHttpRequest object that is used for the response channel.
<static>  SL4B_ObjectSubscriptionManager oObjectSubscriptionManager
          Object used to handle subscriptions to RTTP objects on a users behalf.
 
Constructor Summary
SL4B_JavaScriptRttpProvider ()
            Constructs a SL4B_JavaScriptRttpProvider.
 
Method Summary
 void addConnectionListener(l_oListener)
           Adds the specified SL4B_ConnectionListener to the collection of connection listeners that will be notified when a connection event occurs.
 void checkConnected()
           Called on a timeout to check that a connection attempt that has been initiated has completed
 void clearContainerWindow(<Object> l_oContainerKey)
           Clears the container window.
 void connect()
           Invoked when a connection to the Liberator needs to be established.
 void contribObject(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectName, <SL4B_ContributionFieldData> l_oFieldData)
           Contributes the specified field name/value data to the RTTP object with the specified name.
 void createConnection(l_bSessionReconnect)
           Creates a connection of the correct type.
 void createConnectionLost(<String> l_sReason, <boolean> bFullReconnect)
           Notifies connection listeners that connection is lost and reconnects.
 void createObject(<String> l_sObjectName, <String> l_sRttpType)
           Attempts to create an RTTP object with the specified name and type on the Liberator.
 void deleteObject(<String> l_sObjectName)
           Attempts to delete the RTTP object with the specified name from the Liberator.
 void getAutoDirectory(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sDirectoryName, <String> l_sFieldList, <String> l_sFilter, <boolean> l_bIsUpdateFilter)
           Requests the specified directory from the Liberator.
 Object getContainer(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sContainerName, <String> l_sFieldList, <int> l_nWindowStart, <int> l_nWindowEnd)
           Requests the specified container from the Liberator.
 String getFieldName(<String> l_sFieldCode)
           Gets the name of the field with the specified field code.
 Object getManagedConnection()
          
 void getObject(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectName, <String> l_sFieldList)
           Requests the specified list of fields for the specified RTTP object from the Liberator.
 void getObjects(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectList, <String> l_sFieldList)
           Requests the specified list of fields for the specified RTTP objects from the Liberator.
 String getVersion()
           Gets the version number of the RTTP provider.
 String getVersionInfo()
           Gets the full version details of the RTTP provider.
 void initialise()
           This method will set the common domain for the client application so that real-time javascript streaming can be achieved.
 void loggedIn()
           Invokes the super class loggedIn method, then invokes the SL4B_ConnectionProxy.sendSync() method if latency is enabled.
 void login(<String> l_sUsername, <String> l_sPassword)
           This method must be invoked by the SL4B_AbstractCredentialsProvider that was responsible for getting the username and password to login to the Liberator.
 void logout()
           The logout message will jump over any other RTTP messages that have been queued up, since the communication with the Liberator is asynchronous and in most cases they are now redundant.
 void onLoad(<HtmlEvent> l_oEvent)
           Invoked by the SL4B_WindowEventHandler singleton when the windows onload event fires.
 void receiveMessage(<SL4B_RttpMessage> l_oRttpMessage, oRequest, oObjectNumberMapAccessor)
           Invoked when an RTTP message is received from the Liberator.
 void reconnect()
           Reconnects by stopping the current connection and establishing another
 void removeAutoDirectory(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sDirectoryName, <String> l_sFieldList, <String> l_sFilter, <boolean> l_bIsUpdateFilter)
           Cancels the specified SL4B_AbstractSubscribers subscription for the given directory
 void removeConnectionListener(l_oListener)
           Removes the specified SL4B_ConnectionListener from the collection of connection listeners that will be notified when a connection event occurs.
 void removeContainer(<SL4B_AbstractSubscriber> l_oSubscriber, <Object> l_oContainerKey)
           Cancels the specified SL4B_AbstractSubscribers subscription for the given container
 void removeObject(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectName, <String> l_sFieldList)
           Cancels the specified SL4B_AbstractSubscribers subscription for the list of fields for the specified RTTP object.
 void removeObjects(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectList, <String> l_sFieldList)
           Cancels the specified SL4B_AbstractSubscribers subscription for the list of fields for the specified RTTP objects.
 void removeSubscriber(<SL4B_AbstractSubscriber> l_oSubscriber)
           Cancels the specified SL4B_AbstractSubscribers subscription for all RTTP objects and fields and removed.
 void setContainerWindow(<SL4B_ContainerKey> l_oContainerKey, <int> l_nWindowStart, <int> l_nWindowEnd)
           Sets the window for a container.
 void setGlobalThrottle(<String> l_sThrottleLevel)
           Sets the throttle level that will be applied to all the objects that the client subscribes to.
 void setThrottleObject(<String> l_sObjectName, <String> l_sThrottleLevel)
           Sets the throttle level for the specified RTTP object.
 void setThrottleObjects(l_sObjectNames, <String> l_sThrottleLevel)
           Sets the throttle level for all of the specified RTTP objects.
 void stop()
           Cleans up the JavaScript RTTP provider by invoking the SL4B_AbstractRttpProvider.stop() method, clearing the request queues and connection check timeouts, then calling the SL4B_ConnectionProxy.stop() method.
 void storeCapabilities(l_sCapabilities)
          
<static> void checkWindowRange( l_nWindowStart, l_nWindowEnd)
          
<static> Object createProvider(l_oLiberatorConfiguration, oOldProvider)
          
 
Methods inherited from class SL4B_AbstractRttpProvider
getListener, registerSlave, deregisterSlave, getLiberatorConfiguration, connected, credentialsRetrieved, getFilteredObject, getFilteredObjects, removeFilteredObject, removeFilteredObjects, createFieldListForAutoDirectory, createFieldListForContainer, getFilteredNewsHeadline, getFilteredNewsHeadlines, removeFilteredNewsHeadline, removeFilteredNewsHeadlines, getObjectType, disableWTStatsTimeout, clearObjectListeners, blockObjectListeners, unblockObjectListeners, getFieldNames, debug, setDebugLevel
 

Field Detail

super_stop

Object super_stop

bFramesCreatedFlag

<static> boolean bFramesCreatedFlag

const_REQUEST_FRAME_ID

<static> String const_REQUEST_FRAME_ID

const_REQUEST_FRAME_URL

<static> String const_REQUEST_FRAME_URL

const_RESPONSE_FRAME_ID

<static> String const_RESPONSE_FRAME_ID

const_RESPONSE_FRAME_URL

<static> String const_RESPONSE_FRAME_URL

oObjectSubscriptionManager

<static> SL4B_ObjectSubscriptionManager oObjectSubscriptionManager

Constructor Detail

SL4B_JavaScriptRttpProvider

SL4B_JavaScriptRttpProvider()

Method Detail

addConnectionListener

void addConnectionListener(l_oListener)

checkConnected

void checkConnected()

clearContainerWindow

void clearContainerWindow(<Object> l_oContainerKey)

connect

void connect()

contribObject

void contribObject(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectName, <SL4B_ContributionFieldData> l_oFieldData)

createConnection

void createConnection(l_bSessionReconnect)

createConnectionLost

void createConnectionLost(<String> l_sReason, <boolean> bFullReconnect)

createObject

void createObject(<String> l_sObjectName, <String> l_sRttpType)

deleteObject

void deleteObject(<String> l_sObjectName)

getAutoDirectory

void getAutoDirectory(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sDirectoryName, <String> l_sFieldList, <String> l_sFilter, <boolean> l_bIsUpdateFilter)

getContainer

Object getContainer(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sContainerName, <String> l_sFieldList, <int> l_nWindowStart, <int> l_nWindowEnd)

getFieldName

String getFieldName(<String> l_sFieldCode)

getManagedConnection

Object getManagedConnection()

getObject

void getObject(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectName, <String> l_sFieldList)

getObjects

void getObjects(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectList, <String> l_sFieldList)

getVersion

String getVersion()

getVersionInfo

String getVersionInfo()

initialise

void initialise()

loggedIn

void loggedIn()

login

void login(<String> l_sUsername, <String> l_sPassword)

logout

void logout()

onLoad

void onLoad(<HtmlEvent> l_oEvent)

receiveMessage

void receiveMessage(<SL4B_RttpMessage> l_oRttpMessage, oRequest, oObjectNumberMapAccessor)

reconnect

void reconnect()

removeAutoDirectory

void removeAutoDirectory(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sDirectoryName, <String> l_sFieldList, <String> l_sFilter, <boolean> l_bIsUpdateFilter)

removeConnectionListener

void removeConnectionListener(l_oListener)

removeContainer

void removeContainer(<SL4B_AbstractSubscriber> l_oSubscriber, <Object> l_oContainerKey)

removeObject

void removeObject(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectName, <String> l_sFieldList)

removeObjects

void removeObjects(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectList, <String> l_sFieldList)

removeSubscriber

void removeSubscriber(<SL4B_AbstractSubscriber> l_oSubscriber)

setContainerWindow

void setContainerWindow(<SL4B_ContainerKey> l_oContainerKey, <int> l_nWindowStart, <int> l_nWindowEnd)

setGlobalThrottle

void setGlobalThrottle(<String> l_sThrottleLevel)

setThrottleObject

void setThrottleObject(<String> l_sObjectName, <String> l_sThrottleLevel)

setThrottleObjects

void setThrottleObjects(l_sObjectNames, <String> l_sThrottleLevel)

stop

void stop()

storeCapabilities

void storeCapabilities(l_sCapabilities)

checkWindowRange

<static> void checkWindowRange( l_nWindowStart, l_nWindowEnd)

createProvider

<static> Object createProvider(l_oLiberatorConfiguration, oOldProvider)

Caplin SL4B SDK 4.5.4

${JSDOC.FOOTER}
Documentation generated by JSDoc on Tue May 12 09:30:26 2009