|
Caplin SL4B SDK 4.5.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--SL4B_AbstractRttpProvider
|
+--SL4B_JavaScriptRttpProvider
SL4B_AbstractRttpProvider
Implementation of the SL4B_AbstractRttpProvider base class that uses pure
AJAX (JavaScript and DHMTL) techniques to communicate with the Liberator.
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.
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)
|
| Field Detail |
Object super_stop
<static> boolean bFramesCreatedFlag
<static> String const_REQUEST_FRAME_ID
<static> String const_REQUEST_FRAME_URL
<static> String const_RESPONSE_FRAME_ID
<static> String const_RESPONSE_FRAME_URL
<static> SL4B_ObjectSubscriptionManager oObjectSubscriptionManager
SL4B_AbstractRttpProvider calls such as SL4B_AbstractRttpProvider.getObjects().
| Constructor Detail |
SL4B_JavaScriptRttpProvider()
SL4B_JavaScriptRttpProvider.
| Method Detail |
void addConnectionListener(l_oListener)
SL4B_ConnectionListener to the collection of connection
listeners that will be notified when a connection event occurs. It is possible to add the same
listener multiple times, in which case it will be notified of a single connection event multiple
times (equal to the number of times it has been registered).l_oConnectionListener - The connection listener to be registered with this SL4B_AbstractRttpProvider.
void checkConnected()
void clearContainerWindow(<Object> l_oContainerKey)
l_oContainerKey - The unique token identifying the container, returned by the original getContainer() call.
void connect()
SL4B_AbstractRttpProvider subclass to know when it can safely invoke this
method.
SL4B_AbstractRttpProvider must have an
implementation for this method.void contribObject(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectName, <SL4B_ContributionFieldData> l_oFieldData)
SL4B_AbstractSubscriber will be informed if the contribution is
successful or not.l_oSubscriber - The SL4B_AbstractSubscriber that will be informed whether the contribution was successful or not.
l_sObjectName - The name of the RTTP object the specified data will be contributed to.
l_oFieldData - The field name/value pair data to be contributed.
SL4B_Exception If the specified contribution field data object is null or empty. void createConnection(l_bSessionReconnect)
l_bSessionReconnect is set to
true then the current connection type will be used. If l_bSessionReconnect
is set to false and if the previous connection succeeded, then this connection will
be retried. Otherwise the next configured connection type will be tried. If the new connection
type is invalid, then a type 3 connection will be created instead.l_bSessionReconnect - {boolean} Determines whether the current connection type should be used to make a new connection.
void createConnectionLost(<String> l_sReason, <boolean> bFullReconnect)
l_sReason - Brief description of why the connection was lost.
bFullReconnect - true if a full reconnect must be attempted, or false if a session reconnect may be attempted.
void createObject(<String> l_sObjectName, <String> l_sRttpType)
l_sObjectName - The name of the RTTP object to be created on the Liberator.
l_sRttpType - The type of object to be created. The SL4B_ObjectType singleton defines the possible values.
true if the object was successfully created, otherwise false.
void deleteObject(<String> l_sObjectName)
l_sObjectName - The name of the RTTP object to be deleted.
true if the object was successfully deleted, otherwise false.
void getAutoDirectory(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sDirectoryName, <String> l_sFieldList, <String> l_sFilter, <boolean> l_bIsUpdateFilter)
l_oSubscriber - The SL4B_AbstractSubscriber that will be informed of updates to the specified object.
l_sDirectoryName - The name of the RTTP object to be requested from the Liberator.
l_sFieldList - [optional] A comma separated list of the fields to be requested for the specified objects. If this argument is omitted, all the fields will be requested.
l_sFilter - [optional] The filter to apply to the directory listing (see SL4B_AbstractRttpProvider.getFilteredObject() for syntax information).
l_bIsUpdateFilter - [optional] true if an update only filter must be used, otherwise false. If this argument is omitted, it will default to true (see SL4B_AbstractRttpProvider.getFilteredObject() for more information).
Object getContainer(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sContainerName, <String> l_sFieldList, <int> l_nWindowStart, <int> l_nWindowEnd)
l_oSubscriber - The SL4B_AbstractSubscriber that will be informed of updates to the specified object.
l_sContainerName - The name of the RTTP object to be requested from the Liberator.
l_sFieldList - [optional] A comma separated list of the fields to be requested for the specified objects. If this argument is omitted, all the fields will be requested.
l_nWindowStart - [optional] The start index of the container window
l_nWindowEnd - [optional] The end index of the container window
String getFieldName(<String> l_sFieldCode)
l_sFieldCode - The code used to represent the field.
Object getManagedConnection()
void getObject(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectName, <String> l_sFieldList)
SL4B_AbstractSubscriber.l_oSubscriber - The SL4B_AbstractSubscriber that will be informed of updates to the specified object.
l_sObjectName - The name of the RTTP object to be requested from the Liberator.
l_sFieldList - [optional] A comma separated list of the fields to be requested for the specified object. If this argument is omitted, all the fields will be requested.
void getObjects(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectList, <String> l_sFieldList)
SL4B_AbstractSubscriber.l_oSubscriber - The SL4B_AbstractSubscriber that will be informed of updates to the specified objects.
l_sObjectList - A space separated list of the names of the RTTP objects to be requested from the Liberator.
l_sFieldList - [optional] A comma separated list of the fields to be requested for the specified objects. If this argument is omitted, all the fields will be requested.
String getVersion()
String getVersionInfo()
void initialise()
void loggedIn()
loggedIn method, then invokes the
SL4B_ConnectionProxy.sendSync() method if latency is enabled.void login(<String> l_sUsername, <String> l_sPassword)
SL4B_AbstractCredentialsProvider that was responsible
for getting the username and password to login to the Liberator. Once the credentials have been
validated, the SL4B_SubscriptionManager.ready() method should be invoked.l_sUsername - The username to use to login to the Liberator.
l_sPassword - The password (or token) to use to login to the Liberator.
void logout()
void onLoad(<HtmlEvent> l_oEvent)
SL4B_WindowEventHandler singleton when the windows onload event fires.
When this method is invoked it calls {SL4B_ConnectionProxy#start} to establish the initial
connection to the Liberator.l_oEvent - The HTML event object associated with the load event.
void receiveMessage(<SL4B_RttpMessage> l_oRttpMessage, oRequest, oObjectNumberMapAccessor)
l_oRttpMessage - the RTTP message that was received.
void reconnect()
void removeAutoDirectory(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sDirectoryName, <String> l_sFieldList, <String> l_sFilter, <boolean> l_bIsUpdateFilter)
SL4B_AbstractSubscribers subscription for the given directoryl_oSubscriber - The SL4B_AbstractSubscriber that will cease to be informed of updates to the specified object.
l_sDirectoryName - The name of the RTTP object to be discarded from the Liberator.
l_sFieldList - [optional] A comma separated list of the fields to be discarded for the specified object. If this argument is omitted, all the fields will be discarded.
l_sFilter - [optional] The filter that was applied to the directory listing (see SL4B_AbstractRttpProvider.getFilteredObject() for syntax information).
l_bIsUpdateFilter - [optional] true if an update only filter must be used, otherwise false. If this argument is omitted, it will default to true (see SL4B_AbstractRttpProvider.getFilteredObject() for more information).
void removeConnectionListener(l_oListener)
SL4B_ConnectionListener from the collection of connection
listeners that will be notified when a connection event occurs. If the connection listener has
been registered multiple times, only the first occurrance will be removed.l_oConnectionListener - The connection listener to be deregistered with this SL4B_AbstractRttpProvider.
true if the connection listener had previously been registered, otherwise false.
void removeContainer(<SL4B_AbstractSubscriber> l_oSubscriber, <Object> l_oContainerKey)
SL4B_AbstractSubscribers subscription for the given containerl_oSubscriber - The SL4B_AbstractSubscriber that will cease to be informed of updates to the specified object.
l_oContainerKey -
void removeObject(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectName, <String> l_sFieldList)
SL4B_AbstractSubscribers subscription for the list of fields
for the specified RTTP object. This can be used to discard a subset of the fields that have
previously been requested for the object.l_oSubscriber - The SL4B_AbstractSubscriber that will cease to be informed of updates to the specified object.
l_sObjectName - The name of the RTTP object to be discarded from the Liberator.
l_sFieldList - [optional] A comma separated list of the fields to be discarded for the specified object. If this argument is omitted, all the fields will be discarded.
void removeObjects(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectList, <String> l_sFieldList)
SL4B_AbstractSubscribers subscription for the list of fields
for the specified RTTP objects. This can be used to discard a subset of the fields that have
previously been requested for these objects.l_oSubscriber - The SL4B_AbstractSubscriber that will cease to be informed of updates to the specified objects.
l_sObjectList - A space separated list of the names of the RTTP objects to be discarded from the Liberator.
l_sFieldList - [optional] A comma separated list of the fields to be discarded for the specified objects. If this argument is omitted, all the fields will be discarded.
void removeSubscriber(<SL4B_AbstractSubscriber> l_oSubscriber)
SL4B_AbstractSubscribers subscription for all RTTP objects and fields
and removed.l_oSubscriber - The SL4B_AbstractSubscriber that will cease to be informed of all updates and be removed.
void setContainerWindow(<SL4B_ContainerKey> l_oContainerKey, <int> l_nWindowStart, <int> l_nWindowEnd)
l_oContainerKey - The SL4B_ContainerKey returned by getContainer that represents the container.
l_nWindowStart - [optional] The start index of the container window
l_nWindowEnd - [optional] The end index of the container window
void setGlobalThrottle(<String> l_sThrottleLevel)
SL4B_AbstractRttpProvider.setThrottleObject() or
SL4B_AbstractRttpProvider.setThrottleObjects(). To call any of those methods on the
AbstractRttpProvider get an instance of it from SL4B_Accessor.getRttpProvider().
SL4B_ThrottleLevel defines all the available throttle levels.l_sThrottleLevel - The throttle level to be applied to for all requested objects.
void setThrottleObject(<String> l_sObjectName, <String> l_sThrottleLevel)
SL4B_ThrottleLevel defines all the available throttle levels.
Call this methods on an instance of AbstractRttpProvider, which you can get from
SL4B_Accessor.getRttpProvider().l_sObjectName - The name of the RTTP object to be throttled.
l_sThrottleLevel - The throttle level to be applied to the specified object.
void setThrottleObjects(l_sObjectNames, <String> l_sThrottleLevel)
SL4B_ThrottleLevel defines all the available throttle levels.
Call this methods on an instance of AbstractRttpProvider, which you can get from
SL4B_Accessor.getRttpProvider().l_sThrottleLevel - The throttle level to be applied to the specified objects.
l_sObjectList - A space separated list of the names of the RTTP objects to be throttled.
void stop()
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)
|
Caplin SL4B SDK 4.5.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||