|
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_TestRttpProvider
SL4B_AbstractRttpProvider
An implementation of SL4B_AbstractRttpProvider that uses random
numbers to create synthesised objects for testing purposes. This allows web sites
to be built and tested even when there is no Liberator server available.
This provider can be configured to return any specific data by using the
addDecimalField(), addIntegerField(), addStringField(), and
addObject() methods. Alternatively, a number of objects and fields come
pre-defined:
| Constructor Summary | |
SL4B_TestRttpProvider
()
|
|
| Method Summary | |
void
|
addDecimalField(<String> l_sName, <float> l_nMin, <float> l_nMax)
Adds a new synthesised decimal field. |
void
|
addIntegerField(<String> l_sName, <int> l_nMin, <int> l_nMax)
Adds a new synthesised integer field. |
void
|
addObject(<String> l_sName, <int> l_nFrequency, <int> l_nOffset)
Makes a new synthesised object available to users of this RTTP provider. |
void
|
addStringField(<String> l_sName, <String> l_sDefaultValue)
Adds a new synthesised text field. |
void
|
blockObjectListeners(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectList)
Stops the specified SL4B_AbstractSubscriber from receiving updates for the
specified objects.
|
void
|
clearObjectListeners(<SL4B_AbstractSubscriber> l_oSubscriber, <int> l_nDiscardTime)
Removes all the subscriptions for the specified SL4B_AbstractSubscriber.
|
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
|
createObject(<String> l_sObjectName, <String> l_sRttpType)
Attempts to create an RTTP object with the specified name and type on the Liberator. |
void
|
debug(<String> l_sLevelName, <String> l_sMessage)
Adds the specified debug message to the debug log provided the specified level is of equal or higher priority to the current debug level of the RTTP provider (see SL4B_AbstractRttpProvider.setDebugLevel()).
|
void
|
deleteObject(<String> l_sObjectName)
Attempts to delete the RTTP object with the specified name from the Liberator. |
void
|
disableWTStatsTimeout(<int> l_nTime)
Disables the WTStats timeout for the specfied period of time. |
String
|
getFieldNames()
Gets a comma separated list of the names of all the fields that are available from the Liberator. |
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. |
void
|
getObjectType(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectName)
Requests the specified type of the RTTP object from the Liberator. |
void
|
getVersion()
Gets the version number of the RTTP provider. |
void
|
getVersionInfo()
Gets the full version details of the RTTP provider. |
void
|
initialise()
Invoked immediately after the concrete SL4B_AbstractRttpProvider has been set.
|
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()
Logs out of the Liberator. |
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
|
setDebugLevel(<String> l_sLevelName)
Sets the level that is used to determine whether or not a debug message is added to the debug log or not. |
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(<String> l_sObjectList, <String> l_sThrottleLevel)
Sets the throttle level for all of the specified RTTP objects. |
void
|
unblockObjectListeners(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectList)
Allows the specified SL4B_AbstractSubscriber to start receiving updates for the
specified objects which had previously been blocked (see
SL4B_AbstractRttpProvider.blockObjectListeners()).
|
| Constructor Detail |
SL4B_TestRttpProvider()
| Method Detail |
void addDecimalField(<String> l_sName, <float> l_nMin, <float> l_nMax)
l_sName - The name by which this field will be available.
l_nMin - The minimum value this field can have.
l_nMax - The maximum value this field can have.
void addIntegerField(<String> l_sName, <int> l_nMin, <int> l_nMax)
l_sName - The name by which this field will be available.
l_nMin - The minimum value this field can have.
l_nMax - The maximum value this field can have.
void addObject(<String> l_sName, <int> l_nFrequency, <int> l_nOffset)
l_sName - The name by which this object will be available.
l_nFrequency - How often updates will be sent out for this object.
l_nOffset - This offset is applied to all ineger and decimal fields, allowing the same fields to have different ranges on different objects.
void addStringField(<String> l_sName, <String> l_sDefaultValue)
l_sName - The name by which this field will be available.
l_sDefaultValue - The value this field will have (unless later changed).
void blockObjectListeners(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectList)
SL4B_AbstractSubscriber from receiving updates for the
specified objects. The Liberator will continue to send the updates, however they are not passed
onto the subscriber.l_oSubscriber - The SL4B_AbstractSubscriber that will have updates to its requested objects blocked.
l_sObjectList - [optional] A space separated list of the names of the RTTP objects to be have their updates blocked. If omitted, all the objects that the SL4B_AbstractSubscriber has subscribed to will have their updates blocked.
void clearObjectListeners(<SL4B_AbstractSubscriber> l_oSubscriber, <int> l_nDiscardTime)
SL4B_AbstractSubscriber.l_oSubscriber - The SL4B_AbstractSubscriber that will have all its object requests discarded.
l_nDiscardTime - [optional] The length of time (in milliseconds) to wait before discarding the subscriptions from the Liberator. If this is omitted, a value of 10000 is used.
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 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 debug(<String> l_sLevelName, <String> l_sMessage)
SL4B_AbstractRttpProvider.setDebugLevel()).
SL4B_DebugLevel defines all the available debug levels.l_sLevelName - The name of the debug level at which the message should be output to the debug log.
l_sMessage - The message to be output to the debug log.
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 disableWTStatsTimeout(<int> l_nTime)
l_nTime - The number of milliseconds the WTStats timeout will be disabled for.
String getFieldNames()
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.
void getObjectType(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectName)
SL4B_AbstractSubscriber will be notified of the objects type.l_oSubscriber - The SL4B_AbstractSubscriber that will be informed of the specified objects type.
l_sObjectName - The name of the RTTP object to be requested from the Liberator.
void getVersion()
void getVersionInfo()
void initialise()
SL4B_AbstractRttpProvider has been set. This
method should be invoked whilst the web page is still loading (i.e. it is still safe to add
elements to the DOM using document.write). It should be used to initialise the RTTP
communication mechanism that is going to be used (e.g. download the RTTP applet).
SL4B_AbstractRttpProvider must have an
implementation for this method.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()
SL4B_AbstractRttpProvider.stop() method instead.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 setDebugLevel(<String> l_sLevelName)
SL4B_DebugLevel defines all the available debug levels.l_sLevelName - The name of the debug level to be set.
true if the specified level was successfully set, false otherwise.
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(<String> l_sObjectList, <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_sObjectList - A space separated list of the names of the RTTP objects to be throttled.
l_sThrottleLevel - The throttle level to be applied to the specified objects.
void unblockObjectListeners(<SL4B_AbstractSubscriber> l_oSubscriber, <String> l_sObjectList)
SL4B_AbstractSubscriber to start receiving updates for the
specified objects which had previously been blocked (see
SL4B_AbstractRttpProvider.blockObjectListeners()).l_oSubscriber - The SL4B_AbstractSubscriber that will have updates to its requested objects unblocked.
l_sObjectList - [optional] A space separated list of the names of the RTTP objects to be have their updates unblocked. If omitted, all the objects that the SL4B_AbstractSubscriber has subscribed to will have their updates unblocked.
|
Caplin SL4B SDK 4.5.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||