background image

changePswd()

17

The following is an example of a Debug approval request:

nc_admin.call("approveDebugSession", null, appName/instName", 1234);

changePswd()

Availability

Flash Player 6.

Flash Communication Server MX 1.0.

Usage

changePswd(

admin_name, password 

[, 

scope

])

Parameters

admin_name

  A string that contains the name of the administrator whose password is being 

changed.

password

  A string that contains that administrator’s new password.

scope

  Optional; a string that specifies whether the administrator is a server administrator or 

virtual host administrator, and for which virtual host. 

To change the password for the specified administrator on the virtual host to which you’re 
connected, omit this parameter. To change the password for the specified administrator on a 
different virtual host, specify 

adaptor_name

/

virtual_hostname

To change a server administrator’s password, specify 

server

.

Returns

If the call succeeds, the server sends a reply information object with a 

level

 property of 

status

 and a 

code

 property of 

NetConnection.Call.Success

.

If the call fails, the server sends a reply information object with a 

level

 property of 

error

 

and a 

code

 property of 

NetConnection.Admin.CommandFailed

 or a more specific value, if 

available. Some objects might also have a 

description

 property that contains a string 

describing the cause of the failure.

If the specified administrator does not exist, this command fails.

Description

Changes the password for the specified administrator. The password is encoded before it is 
written to the Server.xml configuration file.

Virtual host administrators can change only their own password. 

Summary of Contents for FLASH MEDIA SERVER 2-SERVER MANAGEMENT ACTIONSCRIPT...

Page 1: ...Server Management ActionScript Language Reference...

Page 2: ...the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third party sites Sorenson Spark video compression and decompression technology licensed from So...

Page 3: ...addVHostAlias 15 approveDebugSession 16 changePswd 17 gc 18 getActiveInstances 19 getAdaptors 19 getAdminContext 20 getAdmins 21 getApps 22 getAppStats 22 getConfig 24 getConfig2 27 getGroupMembers 30...

Page 4: ...haredObjectStats 50 getUsers 51 getUserStats 52 getVHosts 53 getVHostStats 54 ping 56 reloadApp 56 removeAdmin 57 removeApp 58 removeVHostAlias 59 restartVHost 60 setConfig 62 setConfig2 65 startServe...

Page 5: ...Server Management ActionScript API To use the Server Management ActionScript API you need to have Flash and Flash Media Server installed and you need to have administrative access to Flash Media Serve...

Page 6: ...nect to the server on localhost nc new NetConnection nc connect rtmp localhost 1111 admin MHill 635xjh27 To prevent unauthorized users from accessing the administration server you should use a firewal...

Page 7: ...ace admin_name and admin_pass with your valid administrator name and password Establishes the connection to Flash Media Server nc new NetConnection nc connect rtmp localhost 1111 admin admin_name admi...

Page 8: ...aracters destination text t destination text prop obj prop newline if typeof obj prop object recursively call printObj printObj obj prop destination tabLevel 1 Alerts you if there are errors connectin...

Page 9: ...Management ActionScript API contains the following three types of methods Queries let you monitor Flash Media Server its applications and specific instances of its applications Administrative command...

Page 10: ...o connect to a selected application getActiveInstances Returns an array of strings that contains the names of all running application instances on the connected virtual host getAdaptors Returns an arr...

Page 11: ...statistics about the operation of the server including the length of time the server has been running and I O and message cache statistics getServices Returns an array containing the names of all the...

Page 12: ...Unloads an instance of an application if it is loaded and then reloads the instance removeAdmin Removes an administrator from the system removeApp Removes an application or an instance of an applicat...

Page 13: ...st specify the virtual host as adaptor_name virtual_host_name Returns If the call succeeds the server sends a reply information object with a level property of status and a code property of NetConnect...

Page 14: ...me of the application to be added Returns If the call succeeds the server sends a reply information object with a level property of status and a code property of NetConnection Call Success If the call...

Page 15: ...lue A Boolean value indicating whether the alias change will be written to the configuration file to last beyond the vhost s next restart true or whether this alias will be lost on vhost restart false...

Page 16: ...non zero and must be within the range of 2 31 1 that is between positive or negative 2147483648 If there is a pending connection with a given PIN and another connection arrives with the same PIN while...

Page 17: ...the password for the specified administrator on a different virtual host specify adaptor_name virtual_hostname To change a server administrator s password specify server Returns If the call succeeds t...

Page 18: ...None Returns If the call succeeds the server sends a reply information object with a level property of status and a code property of NetConnection Call Success If the call fails the server sends a re...

Page 19: ...g instances of an application on the server or on a specified process If the call fails the server sends a reply information object with a level property of error and a code property of NetConnection...

Page 20: ...ame An alternate adaptor other than _defaultRoot_ on which to find administrators If not specified _defaultRoot_ is used vhostName An alternate vhost other than _defaultVHost_ on which to find vhost a...

Page 21: ...ends a reply information object with a level property of status a code property of NetConnection Call Success and a data property that is an array The data object has the following properties Descript...

Page 22: ...erver sends a reply information object with a level property of error and a code property of NetConnection Call Failed or a more specific value if available Some objects might also have a description...

Page 23: ...cts Number total number of normal connections virtual_connects Number total number of connections through a remote edge group_connects Number total number of remote edges that are connected service_co...

Page 24: ...Flash Player 6 Flash Communication Server MX 1 0 Usage getConfig key scope Parameters key A string that specifies the configuration key for which information is retrieved A key is specified as a list...

Page 25: ...pecify as the first subkey Adaptor adaptor_name VirtualHost vhost_name where adaptor_name is the name of the adaptor and vhost_name is the name of the virtual host All subsequent keys correspond to ta...

Page 26: ...Flash Media Server Examples The following examples show how to get configuration keys in each of the four XML files Establish connection to server nc newNetConnection nc connect rtmp localhost 1111 a...

Page 27: ...getConfig2 key scope Parameters key A string that specifies the configuration key for which information is retrieved A key is specified as a list of subkeys that are delimited by slashes The first su...

Page 28: ...VHost vhost_name Users xml specifies Users xml for vhost administrators Adaptor adaptor_name VHost vhost_name App app_name specifies Application xml If no app_name is specified the default Application...

Page 29: ...st HostPort scope Adaptor _defaultRoot_ tSocket call getConfig2 new onGetConfig key scope find key in Vhost xml key AppsDir scope Adaptor _defaultRoot_ VHost _defaultVHost_ tSocket call getConfig2 new...

Page 30: ...f you want performance statistics for the default instance of the application For example to specify the default instance for an application named ChatApp specify ChatApp _defInst_ groupNumber A numbe...

Page 31: ...l Success and a data property that is an object containing the client performance data The data object has the following properties Property Description connect_time ActionScript Date object time the...

Page 32: ...u want performance statistics in the form application_name instance_name You must specify both the application name and the instance name separated by a slash even if you want performance statistics f...

Page 33: ...me instance_name You must specify both the application name and the instance name separated by a slash even if you want performance statistics for the default instance of the application For example t...

Page 34: ...ject that contains script engine performance data The following are properties of the script object time_high_water_mark Number maximum amount of time in seconds that the script has taken to execute a...

Page 35: ...AppStats getScriptStats getIOStats Availability Flash Player 6 Flash Communication Server MX 1 0 Usage getIOStats Parameters None Returns If the call succeeds the server sends a reply information obje...

Page 36: ...number of messages dropped tunnel_bytes_in Number tunneling header bytes in this is the overhead over and above RTMP payload tunnel_bytes_out Number tunneling header bytes out overhead in the other d...

Page 37: ...copyright String copyright information key String license key that is set in the Server xml file If you have more than one license key this string is a concatenation of all your valid license keys del...

Page 38: ...can run the server on multiprocessor computers max_bandwidth Number maximum bandwidth in megabits per second If you have multiple licenses this number is the sum of the max_bandwidth values of all yo...

Page 39: ...the call succeeds the server sends a reply information object with a level property of status a code property of NetConnection Call Success and a data property that is an array of strings containing t...

Page 40: ...ilable Some objects might also have a description property that contains a string describing the cause of the failure Property Description publisher Object publisher statistics The object has the foll...

Page 41: ...ply information object with a level property of status a code property of NetConnection Call Success and a data property that is an object The data object has the following message cache statistics De...

Page 42: ...ned IDs of all network streams that are currently connected to the specified instance of the application If the call fails the server sends a reply information object with a level property of error an...

Page 43: ...information object with a level property of error and a code property of NetConnection Call Failed or a more specific value if available Some objects might also have a description property that conta...

Page 44: ...ata property that is an array of all the recorded stream names The extended name of a recorded stream is used The name is encoded with keyName type streamName where keyName is the virtual key type is...

Page 45: ...succeeds the server sends a reply information object with a level property of status a code property of NetConnection Call Success and a data property that is an object that contains the following pro...

Page 46: ...object with a level property of error and a code property of NetConnection Call Failed or a more specific value if available Some objects might also have a description property that contains a string...

Page 47: ...al number of messages processed by the server msg_out Number total number of messages sent by the server bytes_in Number total number of bytes read by the server bytes_out Number total number of bytes...

Page 48: ...u only need information about the I O characteristics of the server use the getIOStats method instead See also getIOStats getServices Availability Flash Player 6 Flash Media Server 2 Usage getServices...

Page 49: ...form application_name instance_name Returns If the call succeeds the server sends a reply information object with a level property of status a code property of NetConnection Call Success and a data pr...

Page 50: ...bject with a level property of status a code property of NetConnection Call Success and a data property that is an object The data object has the following properties Property Description version Numb...

Page 51: ...tion_name instance_name Returns If the call succeeds the server sends a reply information object with a level property of status a code property of NetConnection Call Success and a data property that...

Page 52: ...a object has the following properties Property Description connect_time ActionScript Date object time in seconds that the user has been connected to the specified instance of the application msg_in Nu...

Page 53: ...the adaptor If not specified it is assumed to be _defaultRoot_ Returns If the call succeeds the server sends a reply information object with a level property of status a code property of NetConnectio...

Page 54: ...property of status a code property of NetConnection Call Success and a data property that is an object containing the virtual host performance data The data object has the following properties Proper...

Page 55: ...om total_instances_loaded total_instances_unloaded Number total number of instances that have been unloaded bw_in Number current bandwidth in in bytes per second bw_out Number current bandwidth out in...

Page 56: ...ty of error and a code property of NetConnection Call Failed or a more specific value if available Some objects might also have a description property that contains a string describing the cause of th...

Page 57: ...reconnect to the application or instance of the application You can use this command to preload an instance of an application or reload it when application configuration changes are made or the script...

Page 58: ...he call fails Description Removes an administrator from the system Depending on the parameters you specify you can remove server administrators or virtual host administrators You must be a server admi...

Page 59: ...ied application or instance of an application from the virtual host First all instances of the specified application are unloaded Then the application directory is removed from the virtual host If you...

Page 60: ...for vhosts that are used as targets by incoming Flash Media Server connections When you removing an alias that name is no longer available for incoming connections See also addVHostAlias restartVHost...

Page 61: ...ver Users must reconnect each time you restart a virtual host Before using this command you might want to take steps to notify connected users Virtual host administrators can only restart the virtual...

Page 62: ...the Server xml file specify Admin or Server as the first subkey All subsequent keys correspond to tags that are relative to the Admin or Server tag in the Server xml file You must be a server adminis...

Page 63: ...o Flash Media Server omit this parameter Returns If the call succeeds the server sends a reply information object with a level property of status and a code property of NetConnection Call Success The...

Page 64: ...0 0 1 1938 key Adaptor _defaultRoot_ HostPortList HostPort val 128 0 0 1 1938 nc call setConfig new onSetConfig key val Change key in Vhost xml Set RecordAccessLog to true key Adaptor _defaultRoot_ Vi...

Page 65: ...by slashes The first subkey specifies the XML configuration file that contains the desired configuration key Subsequent subkeys correspond to tags that are relative to that XML configuration file the...

Page 66: ...of interest If adaptor_name is not the name of the adaptor the caller is connected to or vhost_name is not the name of the vhost that the caller is connected to the call fails Adaptor adaptor_name VHo...

Page 67: ...nSetConfig key val set tag data in Adaptor xml key HostPortList HostPort val 1935 80 443 scope Adaptor _defaultRoot_ tSocket call setConfig2 new onSetConfig key val scope set tag data in Vhost xml key...

Page 68: ...that specifies how you want to restart the server If the server is not running and you want to start it omit this parameter If the server is already running and you want to stop it and then restart i...

Page 69: ...code property of NetConnection Call Success If the call fails the server sends a reply information object with a level property of error and a code property of NetConnection Admin Command Failed or a...

Page 70: ...ype String possible values are normal or abort If you use the value normal the server shuts down allowing running applications to end normally If you use the value abort the server immediately shuts d...

Page 71: ...t_name You must be a server administrator to stop a virtual host other than the one to which you re connected Returns If the call succeeds the server sends a reply information object with a level prop...

Page 72: ...Communication Server MX 1 0 Usage unloadApp app_instance Parameters app_instance A string that contains the name of the application or instance of the application in the form application_name instanc...

Page 73: ...down and all the users who are connected to any instance of the application are immediately disconnected If an instance of an application is specified only that instance is shut down and all the users...

Page 74: ...74 Server Management ActionScript Language Reference...

Reviews: