⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 queuesrv.script

📁 Software Testing Automation Framework (STAF)的开发代码
💻 SCRIPT
📖 第 1 页 / 共 2 页
字号:
:p.:hp2.Syntax::ehp2.&nbsp; :xph.PEEK WAIT MACHINE "tcp://server1.company.com@6500":exph.:p.:li.:hp2.Goal::ehp2. Wait for, retrieve, and remove the highest priority messagewith type STAF/Start.  Wait a maximum of 30 seconds.:p.:hp2.Syntax::ehp2.&nbsp; :xph.GET WAIT 30000 TYPE STAF/Start:exph.:p.:li.:hp2.Goal::ehp2. Retrieve a priority 3 message from a machine whose endpointcontains system identifier client3.company.com (with any interface or port asindicated by wildcard *) and registered process name JavaTest1 containing themessage referenced by variable TestString.:p.:hp2.Syntax::ehp2.&nbsp; :xph.PEEK PRIORITY 3 MACHINE "*://client3.company.com*" NAME JavaTest1 CONTAINS {TestString}:exph.:p.:li.:hp2.Goal::ehp2. Wait for, retrieve, and remove the highest priority messagewith a type of either STAF/Start or STAF/Shutdown from machines tcp://client1.company.com@6500 or tcp://client2.company.com@6500:p.:hp2.Syntax::ehp2.&nbsp; :xph.GET WAIT TYPE STAF/Start TYPE STAF/Shutdown MACHINE tcp://client1.company.com@6500 MACHINE tcp://client2.company.com@6500:exph.:p.:li.:hp2.Goal::ehp2. Wait for, retrieve, and remove the highest priority messagecontaining either CONTROL or "Hi there":p.:hp2.Syntax::ehp2.&nbsp; :xph.GET WAIT CONTAINS CONTROL CONTAINS "Hi there":exph.:p.:li.:hp2.Goal::ehp2. Wait for, retrieve, and remove the highest priority messagecontaining type "MyProduct/Build/Complete" and containing the string "Version=1.2.0" froma machine whose endpoint contains system identifier buildserver.company.com (with any interface or portas indicated by wildcard *).  Wait a maximum of 60 seconds.:p.:hp2.Syntax::ehp2.&nbsp; :xph.GET WAIT 60000 TYPE "MyProduct/Build/Complete" CONTAINS "Version=1.2.0" MACHINE "*://buildserver.company.com*":exph.:eul..*.*---------------------------------------------------------------------.*:ih1.service commands:ih2.DELETE:i3.queue service:h3.DELETE:p.DELETE allows you to delete a set of messages from the queue.:h4.Syntax:xmp.DELETE &lbrk.PRIORITY <Priority>&rbrk.... &lbrk.MACHINE <Endpoint>&rbrk.... &lbrk.NAME <Name>&rbrk....       &lbrk.HANDLE <Handle>&rbrk.... &lbrk.USER <User>&rbrk.... &lbrk.TYPE <Type>&rbrk....       &lbrk.CONTAINS <String>&rbrk.... &lbrk.ICONTAINS <String>&rbrk....:exmp.:p.:xph.PRIORITY:exph. specifies that you want to delete messages with thegiven priority. The default is any priority.  You may specify this optionmultiple times. &varres.:p.:xph.MACHINE:exph. specifies that you want to delete messages originatingfrom the given machine's endpoint.  The default is any machine.  You mayspecify this option multiple times.  &varres.The format for a machine's endpoint is::xmp.  <Interface>&colon.//<System Identifier>&lbrk.@<Port>&rbrk.:exmp.where a case-insensitive match is performed.You can specify match patterns (e.g. wild cards) for a machine's endpoint.These patterns recognize two special characters, '*' and '?', where '*'matches a string of characters (including an empty string) and '?' matchesany single character (the empty string does not match).   For example, if you want to match on messages from a machine with systemidentifier client1.mycompany.com, no matter what interface or port is inthe machine's endpoint, you could specify "*://client1.mycompany.com*"which would match machines such as "tcp://client1.mycompany.com@6500" and"tcp2://client1.mycompany.com".:p.:xph.NAME:exph. specifies that you want to delete messages originating froma process with the given registered name. The default is any name.  You mayspecify this option multiple times. &varres.:p.:xph.HANDLE:exph. specifies that you want to delete messages originatingfrom a process with the given handle. The default is any handle.  You mayspecify this option multiple times. &varres.:p.:xph.USER:exph. specifies that you want to delete messages originatingfrom a process with a handle that has been authenticatedwith the specified user.  The format for <User> is::xmp.  <Authenticator>&colon.//<User Identifier>:exmp.where a case-insensitive match is performed on the <Authenticator> value and acase-sensitive match is performed on the <User Identifier> value.The default is any user.You may specify this option multiple times.  &varres.:p.:xph.TYPE:exph. specifies that you want to delete messageswith the given type.  The match is case insensitive.You may specify this option multiple times.  &varres.:p.:xph.CONTAINS:exph. specifies that you want to delete messages containingthe given string.  The search is case sensitive.  The default is anymessage.  You may specify this option multiple times.  &varres.:p.:xph.ICONTAINS:exph. specifies that you want to delete messages containingthe given string.  The search is case insensitive.  The default is anymessage.  You may specify this option multiple times.  &varres.:h4.Security:p.This command is only valid with respect to the submitting process' queueand if submitted to the local machine.:h4.Return Codes:p.All return codes from DELETE are documented in :hdref refid=retcode..:h4.Results:p.The result buffer will contain the number of messages deleted.:h4.Examples:p.:ul.:li.:hp2.Goal::ehp2. Delete all messages from the local machine.:p.:hp2.Syntax::ehp2.&nbsp; :xph.DELETE MACHINE "local://local":exph.:p.:li.:hp2.Goal::ehp2. Delete all priority 3 messages from processes with registeredname JavaTest1:p.:hp2.Syntax::ehp2.&nbsp; :xph.DELETE PRIORITY 3 NAME JavaTest1:exph.:p.:li.:hp2.Goal::ehp2. Delete all priority 3 and 4 messages from the machinesreferenced by variables Mach1 and Mach2 containing the string Stage2 orcontaining the string referenced by variable StringTest1.:p.:hp2.Syntax::ehp2.&nbsp; :xph.DELETE PRIORITY 3 PRIORITY 4 MACHINE {Mach1} MACHINE {Mach2} CONTAINS Stage2 CONTAINS {StringTest1}:exph.:p.:li.:hp2.Goal::ehp2. Delete all messages containing the string "Version=1.2.0" withtype "MyProduct/Build/Complete" from a machine whose endpoint containssystem identifier buildserver.company.com (with any interface or portas indicated by wildcard *).:p.:hp2.Syntax::ehp2.&nbsp; :xph.DELETE TYPE "MyProduct/Build/Complete"CONTAINS "Version=1.2.0" MACHINE "*://buildserver.company.com*":exph.:p.:li.:hp2.Goal::ehp2. Delete all messages in the queue.:p.:hp2.Syntax::ehp2.&nbsp; :xph.DELETE:exph.:eul..*.*---------------------------------------------------------------------.*:ih1.service commands:ih2.LIST:i3.queue service:h3.LIST:p.LIST allows you to retrieve the contents of the queue of a given process.:h4.Syntax:xmp.LIST &lbrk.HANDLE <Handle>&rbrk.:exmp.:p.:xph.HANDLE:exph. specifies the handle of the process for which you wantthe queue contents.  The default is the handle of the submitting process.  Thisoption may only default if the request was submitted locally. &varres.:h4.Security:p.&seclvl. 2.:h4.Return Codes:p.All return codes from LIST are documented in :hdref refid=retcode..:h4.Results:p.On successful return, the result buffer will contain a marshalled:xph.<List> of <Map&colon.STAF/Service/Queue/Entry>:exph., representingthe queued messages, sorted in ascending order by priority.The map is defined as follows::table cols='* * * 2*'.:tcap.Definition of map class STAF/Service/Queue/Entry:tnote text='Description'.This map class represents a queued message.:thd.:c.Key Name:c.Display Name:c.Type:c.Format / Value:ethd.:row.:c.priority:c.Priority:c.&stringObj.:c.:row.:c.timestamp:c.Date-Time:c.&stringObj.:c.&timestampFormat.:row.:c.machine:c.Machine:c.&stringObj.:c.:row.:c.handleName:c.Handle Name:c.&stringObj. | &noneObj.:c.:row.:c.handle:c.Handle:c.&stringObj.:c.:row.:c.type:c.Type:c.&stringObj. | &noneObj.:c.:row.:c.message:c.Message:c.<Any>:c.&maskPrivate.:etable.:h4.Examples:p.:ul.:li.:hp2.Goal::ehp2. Retrieve the contents of the submitting process' queue.:p.:hp2.Syntax::ehp2.&nbsp; :xph.LIST:exph.:p.:hp2.Result::ehp2.&nbsp; If the request is submitted from thecommand line, the result, in table format, could look like the following::xmp.P Date-Time Machine        Name   H# User     Type       Message- --------- -------------- ------ -- -------- ---------- ------------------------1 20040912- tcp://client1. STAF_P 1  none://a STAF/Start   13:56:10  austin.ibm.com rocess    nonymous                     @65003 20040912- tcp://client3. JavaTe 36 none://a FVTTest    CONTROL/STAGE2  14:01:52  austin.ibm.com st1       nonymous3 20040912- tcp://client2. STAF_P 1  none://a STAF/Start  14:02:17  austin.ibm.com rocess    nonymous            @65005 20040912- tcp://client3. JavaTe 36 none://a <None>     This is a test message f  13:57:36  austin.ibm.com st1       nonymous            rom Test1.  Phase 2 has            @6500                                             completed.:exmp.:p.:li.:hp2.Goal::ehp2. Retrieve the contents of the process with handle 37.:p.:hp2.Syntax::ehp2.&nbsp; :xph.LIST HANDLE 37:exph.:p.:hp2.Result::ehp2.&nbsp; If the request is issued from the command line, the result,in verbose format, could look like: :xmp.[  {    Priority   : 5    Date-Time  : 20050222-16:50:12    Machine    : tcp://client1.austin.ibm.com@6500    Handle Name: STAF_Process    Handle     : 1    User       : none://anonymous    Type       : STAF/Process/End    Message    : {      endTimestamp: 20050222-16:50:12      fileList    : []      handle      : 30      key         :      rc          : 0    }  }]:exmp.:eul.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -