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 标签:

你可能感兴趣的:(Stream)