delete stream from FMS SSAS

delete stream from FMS SSAS
this is a short SSAS code snippet, which can be used to delete streams in a FMS Application:

Client.prototype.delStream = function (streamName, serverClientId){
s = Stream.get (streamName);
if (s){
    s.onStatus = function (info){
        if (info.code == "NetStream.Clear.Success") {
            trace ("*Stream " + streamName + "deleted.*");
            var msg = "deleted " + streamName ;
                // Print out status message in the application console
            trace ("Sending this message: " + msg + Client.name);
           // Call the client function, 'message,' and pass it the 'msg'
           serverClientId.call ("msgFromSrvr", false, msg);
       }
       if (info.code == "NetStream.Clear.Failure"){
           trace ("*Failure to delete stream " + streamName*);
       }
   };
   //actual clear function
   s.clear ();
}
}this is the client side code to launch the function:
client_nc.call("delStream", "deleteResult", streamName, uId);

Technorati 标签: FMS
posted @ 2009-05-13 19:31  Andy  阅读(356)  评论(0编辑  收藏  举报