-
August 6th, 2007, 12:07 PM
#4
Mone, Thanks a lot!!!
This is exactly I was looking for
Please find the attached snippet and let me know if I have properly understood the api
var lsPage = new PushPage();
var e;
lsPage.context.setDebugAlertsOnClientError(false);
lsPage.context.setRemoteAlertsOnClientError(false) ;
lsPage.context.setDomain(domain);
lsPage.onEngineReady = function(engineRef) {
dojo.debug("Lightstreamer onEngineReady" ) ;
e = engineRef ;
engineRef.context.setDebugAlertsOnClientError(fals e);
engineRef.context.setRemoteAlertsOnClientError(fal se);
engineRef.connection.setUserName("cookie");
engineRef.connection.setPassword("password");
engineRef.connection.setLSHost(host);
engineRef.connection.setLSPort(port);
engineRef.connection.setAdapterName("XYZ");
engineRef.changeStatus("STREAMING");
e.onClientAlert = function ( code, message ) {
dojo.debug("WOW!!!! LightstreamerEngine onClientAlert code[" + code +"] message[" + message + "]" ) ;
}
e.onClientError = function ( message ) {
dojo.debug("WOW!!!! LightstreamerEngine onClientError message[" + message + "]" ) ;
}
e.onServerError = function ( code, message ) {
dojo.debug("WOW!!!! LightstreamerEngine onServerError code[" + code +"] message[" + message + "]" ) ;
}
e.onStatusChange = function ( chngStatus ) {
dojo.debug("WOW!!!! LightstreamerEngine onStatusChange status[" + chngStatus + "]" ) ;
}
}
lsPage.onEngineLost = function() { e = null; }
lsPage.onClientAlert = function ( code, message ) {
dojo.debug("WOW!!!! PushPage onClientAlert code[" + code +"] message[" + message + "]" ) ;
}
lsPage.onClientError = function ( message ) {
dojo.debug("WOW!!!! PushPage onClientError message[" + message + "]" ) ;
}
lsPage.onServerDeny = function ( message ) {
dojo.debug("WOW!!!! PushPage onServerDeny message[" + message + "]" ) ;
}
lsPage.bind();
lsPage.loadEngineMinimal("../struts/lightstreamer-client/lsengine.html");
Thanks,
Rakesh
Similar Threads
-
By msgiribabu in forum Adapter SDKs
Replies: 4
Last Post: February 3rd, 2011, 10:33 AM
-
By rd2008 in forum Client SDKs
Replies: 3
Last Post: October 30th, 2008, 10:25 AM
-
By indrajit in forum Adapter SDKs
Replies: 7
Last Post: March 19th, 2008, 08:31 AM
-
By Waddy in forum General
Replies: 3
Last Post: March 6th, 2007, 09:43 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 10:37 PM.
Bookmarks