1.*************************************************************************** 2.* Software Testing Automation Framework (STAF) 3.* (C) Copyright IBM Corp. 2001, 2004 4.* 5.* This software is licensed under the Eclipse Public License (EPL) V1.0. 6.**************************************************************************** 7 8.*************************-START-OF-PROLOG-**************************** 9.* 10.* File Name : QueueSrv SCRIPT 11.* Descriptive Name : Software Test Automation Framework Queue Service 12.* Detail: 13.* 14.* This file describes the STAF Queue Service. 15.* 16.**************************-END-OF-PROLOG-***************************** 17:i1.queue service 18:ih1.services 19:i2.queue service 20:h2 id=queuesrv.Queue Service 21:h3.Description 22:p.The QUEUE service is one of the internal STAF services. It provides the 23following commands to manipulate the contents of a handle's queue: 24:ul compact. 25:li.QUEUE - Queues a message to a handle's queue 26:li.GET - Retrieves and removes element(s) from the queue of the handle 27submitting the GET request to the QUEUE service 28:li.PEEK - Retrieves element(s) from the queue of the handle 29submitting the PEEK request to the QUEUE service 30:li.DELETE - Deletes a set of elements from a handle's queue 31:li.LIST - Retrieves the entire contents of a handle's queue 32:li.&help. 33:eul. 34.* 35.*--------------------------------------------------------------------- 36.* 37:ih1.service commands 38:ih2.QUEUE 39:i3.queue service 40:h3.QUEUE 41:p.QUEUE allows you to queue a message to a given process handle or to any 42process registered with a given name. 43:h4.Syntax 44:xmp. 45QUEUE MESSAGE <Message> 46 &lbrk.HANDLE <Handle> | NAME <Name>&rbrk. &lbrk.PRIORITY <Priority>&rbrk. &lbrk.TYPE <Type>&rbrk. 47:exmp. 48:p.:xph.MESSAGE:exph. specifies the message to be queued. 49This option will not resolve variables. 50:p.:xph.HANDLE:exph. specifies the process handle to which the message should 51be queued. If the request is made locally, the default is the handle which 52originated the request. &varres. 53:p.:xph.NAME:exph. specifies the registered name of the process(es) to which 54the message should be queued. &varres. 55:note.If the request is made to a remote machine then you must specify either 56:xph.HANDLE:exph. or :xph.NAME:exph.. 57:p.:xph.PRIORITY:exph. specifies the priority of the message to be queued. The 58default is 5. &varres. 59:p.:xph.TYPE:exph. specifies the type for the message to be queued. The 60default is no type. &varres. 61 62:h4.Security 63:p.&seclvl. 3. 64:h4.Return Codes 65:p.All return codes from QUEUE are documented in :hdref refid=retcode.. 66:p.If a message is attempted to be queued to a handle whose queue already 67contains the maximum number of messages allowed, the message will not be 68queued to that handle and return code 28 (Queue Full) will be returned. 69 70:h4.Results 71:p.On successful return: 72:ul. 73:li.If :xph.HANDLE:exph. was specified, or defaulted to, the result buffer will 74contain no data upon return from the submit call. 75:li.If :xph.NAME:exph. was specified, the result buffer will contain the number 76of processes to which the message was queued. 77:eul. 78 79:p.If unsuccessful due to attempting to queue a message to a handle whose queue 80already contains the maximum number of messages allowed, the message will not 81be sent to that handle's queue and return code 28 (Queue full) will be returned 82and the result buffer will be set as follows: 83:p. 84:ul. 85:li.If :xph.HANDLE:exph. was specified, or defaulted to, the result buffer will 86contain the number of messages the handle's queue contains. 87:p. 88:li.If :xph.NAME:exph. was specified, the result buffer will contain a marshalled 89:xph.<Map&colon.STAF/Service/Queue/Error>:exph., providing more information about 90the number of handles, if any, that the message was successfully queued to, and 91the handles that the message could not be successfully queued to because their 92queues are full. The maps are defined as follows: 93:table cols='* * 2* *'. 94:tcap.Definition of map class STAF/Service/Queue/Error 95:tnote text='Description'.This map class represents error information when a 96message is attempted to be sent to all handles with a specified name and at 97least one handle's queue is full. 98:thd. 99:c.Key Name 100:c.Display Name 101:c.Type 102:c.Format / Value 103:ethd. 104:row. 105:c.numberQueued 106:c.Number Queued 107:c.&stringObj. 108:c. 109:row. 110:c.fullQueueList 111:c.Handles with Full Queues 112:c.<List> of <Map&colon.STAF/Service/Queue/FullInfo> 113:c. 114:tnote text='Notes'. 115The "Handles with Full Queues" value will contain a list of information 116about the handles whose queues are full. 117:etnote. 118:etable. 119:table cols='* * * 2*'. 120:tcap.Definition of map class STAF/Service/Queue/FullInfo 121:tnote text='Description'.This map class represents error information 122for a handle whose queue is full. 123:thd. 124:c.Key Name 125:c.Display Name 126:c.Type 127:c.Format / Value 128:ethd. 129:row. 130:c.handle 131:c.Handle 132:c.&stringObj. 133:c. 134:row. 135:c.queueSize 136:c.Queue Size 137:c.&stringObj. 138:c. 139:tnote text='Notes'. 140The "Handle" value will contain the handle number of a handle whose 141queue is full and the "Queue Size" value will contain the number of messages 142that the handle's queue contains. 143:etnote. 144:etable. 145:eul. 146 147:h4.Examples 148:p. 149:ul. 150:li.:hp2.Goal::ehp2. Queue the message "Hello World" to your own handle's queue on 151the local machine. 152:p.:hp2.Syntax::ehp2. :xph.QUEUE MESSAGE "Hello World":exph. 153:p. 154:li.:hp2.Goal::ehp2. Queue priority 1 message "CONTROL/STAGE2" to handle 50. 155:p.:hp2.Syntax::ehp2. :xph.QUEUE HANDLE 50 PRIORITY 1 MESSAGE "CONTROL/STAGE2":exph. 156:p. 157:li.:hp2.Goal::ehp2. Queue the message "Success" with type "Build/Complete" to handle 17. 158:p.:hp2.Syntax::ehp2. :xph.QUEUE HANDLE 17 TYPE "Build/Complete" MESSAGE "Success":exph. 159:p. 160:li.:hp2.Goal::ehp2. Queue the message "Success" to all handles on machine 161test1.company.com whose handle name is "MyProduct/Test". 162:p.:hp2.Syntax::ehp2. 163:xph.STAF test1.company.com QUEUE QUEUE NAME "MyProduct/Test" MESSAGE "Success":exph. 164:p.:hp2.Results:ehp2. 165:ul. 166:li.If one handle exists on machine test1.company.com with name "MyProduct/Test" 167and the message was successfully queued to its handle, return code 0 would be 168returned and the result would contain "1". 169:li.If three handles exist on machine test1.company.com with name "MyHandle" 170and the message was successfully queued to all three handles, return code 0 171would be returned and the result would contain "3". 172:li.If no handles exist on machine test1.company.com with name "MyHandle", 173return code 5 (Handle does not exist) will be returned. 174:li.If one handle exists on machine test1.company.com with name "MyHandle" 175and its queue is full, return code 28 (Queue full) would be returned and, if the 176command was submitted via the command line, the result in verbose format could 177look like: 178:xmp. 179{ 180 Number Queued : 0 181 Handles with Full Queues: [ 182 { 183 Handle : 37 184 Queue Size: 100 185 } 186 ] 187} 188:exmp. 189:li.If three handles exist on machine test1.company.com with name "MyHandle" 190and two of the handles' queues are full and one handle's queue is not full, 191return code 28 (Queue full) would be returned and, if the command was submitted 192via the command line, the result in verbose format could look like: 193:xmp. 194{ 195 Number Queued : 1 196 Handles with Full Queues: [ 197 { 198 Handle : 37 199 Queue Size: 100 200 } 201 { 202 Handle : 41 203 Queue Size: 100 204 } 205 ] 206} 207:exmp. 208:eul. 209:eul. 210.* 211.*--------------------------------------------------------------------- 212.* 213:ih1.service commands 214:ih2.GET 215:i3.queue service 216:ih1.service commands 217:ih2.PEEK 218:i3.queue service 219:h3.GET/PEEK 220:p.GET allows you to retrieve and remove one or more elements from the queue of 221the handle submitting the GET request to the QUEUE service. 222:p.PEEK allows you to retrieve one or more elements from the queue of 223the handle submitting the PEEK request without removing the element(s) from the queue. 224:p. 225By default, only one element will be retrieved/removed from the queue if you don't 226specify the :xph.ALL:exph. or :xph.FIRST:exph. option. 227:p. 228For security reasons, you are only allowed to retrieve messages from your own 229handle's queue, not from any other handle's queue. So, a GET/PEEK request only 230retrieves messages from the queue of the handle that submitted the GET/PEEK 231request to the QUEUE service. Note that you can use the LIST request to 232list messages that are in another handle's queue. 233 234:h4.Syntax 235:xmp. 236GET &lbrk.PRIORITY <Priority>&rbrk.... &lbrk.MACHINE <Endpoint>&rbrk.... &lbrk.NAME <Name>&rbrk.... 237 &lbrk.HANDLE <Handle>&rbrk.... &lbrk.USER <User>&rbrk.... &lbrk.TYPE <Type>&rbrk.... 238 &lbrk.CONTAINS <String>&rbrk.... &lbrk.ICONTAINS <String>&rbrk.... 239 &lbrk.FIRST <Number> | ALL&rbrk. 240 &lbrk.WAIT &lbrk.<Number>[s|m|h|d|w]&rbrk. &rbrk. 241 242PEEK &lbrk.PRIORITY <Priority>&rbrk.... &lbrk.MACHINE <Endpoint>&rbrk.... &lbrk.NAME <Name>&rbrk.... 243 &lbrk.HANDLE <Handle>&rbrk.... &lbrk.USER <User>&rbrk.... &lbrk.TYPE <Type>&rbrk.... 244 &lbrk.CONTAINS <String>&rbrk.... &lbrk.ICONTAINS <String>&rbrk.... 245 &lbrk.FIRST <Number> | ALL&rbrk. 246 &lbrk.WAIT &lbrk.<Number>[s|m|h|d|w]&rbrk. &rbrk. 247:exmp. 248:p.:xph.PRIORITY:exph. specifies that you want to retrieve/remove message(s) 249with the given priority. The default is the highest priority message (i.e., 250the one with the lowest priority number). You may specify this option multiple 251times. &varres. 252:p.:xph.MACHINE:exph. specifies that you want to retrieve/remove message(s) 253originating from the given machine's endpoint. The default is any machine. You may 254specify this option multiple times. &varres. 255The format for a machine's endpoint is: 256:xmp. 257 <Interface>&colon.//<System Identifier>&lbrk.@<Port>&rbrk. 258:exmp. 259where a case-insensitive match is performed. 260You can specify match patterns (e.g. wild cards) for a machine's endpoint. 261These patterns recognize two special characters, '*' and '?', where '*' 262matches a string of characters (including an empty string) and '?' matches 263any single character (the empty string does not match). 264For example, if you want to match on messages from a machine with system 265identifier client1.mycompany.com, no matter what interface or port is in 266the machine's endpoint, you could specify "*://client1.mycompany.com*" 267which would match machines such as "tcp://client1.mycompany.com@6500" and 268"tcp2://client1.mycompany.com". 269:p.:xph.NAME:exph. specifies that you want to retrieve/remove message(s) 270originating from a process with the given registered name. The default is any 271name. You may specify this option multiple times. &varres. 272Note that this option does not specify the handle name for the handle whose 273queue you want to retrieve messages from as you can only retrieve messages 274from the queue of the handle that submitted the GET/PEEK request to the 275QUEUE service. 276:p.:xph.HANDLE:exph. specifies that you want to retrieve/remove message(s) 277originating from a process with the given handle number. The default is any handle. 278You may specify this option multiple times. &varres. 279Note that this option does not specify the handle number for the handle whose 280queue you want to retrieve messages from as you can only retrieve messages 281from the queue of the handle that submitted the GET/PEEK request to the 282QUEUE service. 283:p.:xph.USER:exph. specifies that you want to retrieve/remove a message 284originating from a process with a handle that has been authenticated 285with the specified user. The format for <User> is: 286:xmp. 287 <Authenticator>&colon.//<User Identifier> 288:exmp. 289where a case-insensitive match is performed on the <Authenticator> value and a 290case-sensitive match is performed on the User Identifier. 291The default is any user. 292You may specify this option multiple times. &varres. 293:p.:xph.TYPE:exph. specifies that you want to retrieve/remove message(s) 294with the given type. The match is case insensitive. 295You may specify this option multiple times. &varres. 296:p.:xph.CONTAINS:exph. specifies that you want to retrieve/remove message(s) 297containing the given string. The search is case sensitive. The default is any 298message. You may specify this option multiple times. &varres. 299:p.:xph.ICONTAINS:exph. specifies that you want to retrieve/remove message(s) 300containing the given string. The search is case insensitive. The default is any 301message. You may specify this option multiple times. &varres. 302:p.:xph.ALL:exph. specifies that you want to retrieve/remove all appropriate 303messages that meet the specified criteria. 304If you don't specify the :xph.ALL:exph. or :xph.FIRST:exph. option, 305the default is to retrieve/remove one appropriate message. 306:p.:xph.FIRST:exph. specifies that you want to retrieve/remove the first <Number> 307of appropriate messages that meet the specified criteria, where <Number> 308must be an integer greater than 0. 309If there are fewer appropriate messages on the queue that meet the 310specified criteria than the number you specified for the :xph.FIRST:exph. option, 311then fewer messages will be returned than the number you specified. 312If you don't specify the :xph.ALL:exph. or :xph.FIRST:exph. option, 313the default is to retrieve/remove one appropriate message. &varres. 314:p.:xph.WAIT:exph. specifies that the request should not return until an 315appropriate message is available. You may specify an optional time duration 316after which the request should return. If no time duration is specified, 317the request will wait indefinitely until an appropriate message is available. 318&varres. 319The time duration may be expressed in milliseconds, seconds, minutes, 320hours, days, weeks, or years. Its format is <Number>[s|m|h|d|w], 321where <Number> is an integer >= 0 and indicates milliseconds unless one 322of the following case-insensitive suffixes is specified: 323:ul compact. 324:li.s (for seconds) 325:li.m (for minutes) 326:li.h (for hours) 327:li.d (for days) 328:li.w (for weeks). 329:eul. 330Note that the calculated timeout cannot exceed 4294967294 milliseconds. 331So, the maximum values in each time category that can be specified are: 332:ul compact. 333:li.4294967294 (4294967294 milliseconds) 334:li.4294967s (4294967 seconds) 335:li.71582m (71582 minutes) 336:li.1193h (1193 hours) 337:li.49d (49 days) 338:li.7w (7 weeks) 339:eul. 340 341:h4.Security 342:p.These commands are only valid with respect to the submitting process' queue 343and if submitted to the local machine. 344 345:h4.Return Codes 346:p.All return codes from GET/PEEK are documented in :hdref refid=retcode.. 347:p.For example: 348:ul. 349:li.If the queue is empty or no elements that meet the specified criteria 350are in the queue, the return code will be set to 29 (No Queue Element). 351:li.If the request times out while the queue is empty or before an element 352that meets the specified criteria is sent to the queue, the return code 353will be set to 37 (Timeout). 354:eul. 355 356:h4.Results 357:ul. 358:li.On successful return when you don't specify the :xph.ALL:exph. or :xph.FIRST:exph. 359option, the result buffer will contain a marshalled 360:xph.<Map&colon.STAF/Service/Queue/Entry>:exph., representing the 361appropriate first element from the queue that meets the specified criteria. 362The map is defined as follows: 363:table cols='* * * 2*'. 364:tcap.Definition of map class STAF/Service/Queue/Entry 365:tnote text='Description'.This map class represents an entry from the queue. 366:thd. 367:c.Key Name 368:c.Display Name 369:c.Type 370:c.Format / Value 371:ethd. 372:row. 373:c.priority 374:c.Priority 375.br 376(P) 377:c.&stringObj. 378:c. 379:row. 380:c.timestamp 381:c.Date-Time 382:c.&stringObj. 383:c.×tampFormat. 384:row. 385:c.machine 386:c.Machine 387:c.&stringObj. 388:c. 389:row. 390:c.handleName 391:c.Handle Name 392.br 393(Name) 394:c.&stringObj. | &noneObj. 395:c. 396:row. 397:c.handle 398:c.Handle 399.br 400(H#) 401:c.&stringObj. 402:c. 403:row. 404:c.type 405:c.Type 406:c.&stringObj. | &noneObj. 407:c. 408:row. 409:c.message 410:c.Message 411:c.<Any> 412:c. 413:etable. 414:p. 415For example, if a :xph.GET:exph. or :xph.PEEK:exph. request 416is submitted from the command line (without the :xph.ALL:exph. or 417:xph.FIRST:exph. option), the result, in default format, 418could look like the following: 419:xmp. 420Priority : 3 421Date-Time : 20040912-16:49:11 422Machine : tcp://client2.austin.ibm.com@6500 423Handle Name: STAF_Process 424Handle : 17 425User : none://anonymous 426Type : STAF/Start 427Message : 428:exmp. 429:p. 430:li.On successful return when you specify the :xph.ALL:exph. or :xph.FIRST:exph. 431option, the result buffer will contain a marshalled 432:xph.<List> of <Map&colon.STAF/Service/Queue/Entry>:exph., representing the 433appropriate element(s) from the queue that meet the specified criteria. 434:p. 435For example, if a :xph.GET ALL:exph. or :xph.PEEK ALL:exph. request 436is submitted from the comand line using a static handle and that 437handle's queue contains 5 elements, the result would contain a list of 438all 5 elements, and, in default format, could look like the following: 439:xmp. 440P Date-Time Machine Name H# User Type Message 441- --------- ------------- -------- --- ---------------- ---- ------------------ 4425 20090324- local://local MyHandle 150 none://anonymous A This is message #1 443 15:48:55 4445 20090324- local://local MyHandle 150 none://anonymous A This is message #2 445 15:48:56 4465 20090324- local://local MyHandle 150 none://anonymous B This is message #3 447 15:48:59 4485 20090324- local://local MyHandle 150 none://anonymous A This is message #4 449 15:49:05 4505 20090324- local://local MyHandle 150 none://anonymous B This is message #5 451 15:49:11 452:exmp. 453:p. 454For example, if a :xph.GET FIRST 3:exph. or :xph.PEEK FIRST 3:exph. request 455is submitted from the comand line using a static handle and that 456handle's queue contains 5 elements, the result would contain a list of the 457first 3 elements, and, in default format, could look like the following: 458:xmp. 459P Date-Time Machine Name H# User Type Message 460- --------- ------------- -------- --- ---------------- ---- ------------------ 4615 20090324- local://local MyHandle 150 none://anonymous A This is message #1 462 15:48:55 4635 20090324- local://local MyHandle 150 none://anonymous A This is message #2 464 15:48:56 4655 20090324- local://local MyHandle 150 none://anonymous B This is message #3 466 15:48:59 467:exmp. 468:p. 469For example, if a :xph.GET TYPE B FIRST 2:exph. or :xph.PEEK TYPE B FIRST 2:exph. 470request is submitted from the comand line using a static handle and that 471handle's queue contains the 5 elements from the first example, the result would 472contain a list of the first 2 elements with type B, and, in default format, 473could look like the following: 474:xmp. 475P Date-Time Machine Name H# User Type Message 476- --------- ------------- -------- --- ---------------- ---- ------------------ 4775 20090324- local://local MyHandle 150 none://anonymous B This is message #3 478 15:48:59 4795 20090324- local://local MyHandle 150 none://anonymous B This is message #5 480 15:49:11 481:exmp. 482:eul. 483 484:h4.Examples 485:p. 486:ul. 487:li.:hp2.Goal::ehp2. Wait for, retrieve, and remove the highest priority message 488in my handle's queue. 489:p.:hp2.Syntax::ehp2. :xph.GET WAIT:exph. 490:p. 491:li.:hp2.Goal::ehp2. Wait for and retrieve, but do not remove, the highest priority 492message from machine tcp://server1.company.com@6500 in my handle's queue. 493:p.:hp2.Syntax::ehp2. :xph.PEEK WAIT MACHINE "tcp://server1.company.com@6500":exph. 494:p. 495:li.:hp2.Goal::ehp2. Wait for, retrieve, and remove the highest priority message 496with type STAF/Start in my handle's queue. Wait a maximum of 30 seconds. 497:p.:hp2.Syntax::ehp2. :xph.GET WAIT 30s TYPE STAF/Start:exph. 498:p. 499:li.:hp2.Goal::ehp2. Retrieve a priority 3 message in my handle's queue from a 500machine whose endpoint contains system identifier client3.company.com (with any 501interface or port as indicated by wildcard *) and registered process name JavaTest1 502containing the message referenced by variable TestString. 503:p.:hp2.Syntax::ehp2. :xph.PEEK PRIORITY 3 MACHINE "*://client3.company.com*" NAME JavaTest1 CONTAINS {TestString}:exph. 504:p. 505:li.:hp2.Goal::ehp2. Wait for, retrieve, and remove the highest priority message 506in my handle's queue with a type of either STAF/Start or STAF/Shutdown from 507machines tcp://client1.company.com@6500 or tcp://client2.company.com@6500 508:p.:hp2.Syntax::ehp2. :xph.GET WAIT TYPE STAF/Start TYPE STAF/Shutdown MACHINE tcp://client1.company.com@6500 MACHINE tcp://client2.company.com@6500:exph. 509:p. 510:li.:hp2.Goal::ehp2. Wait for, retrieve, and remove the highest priority message 511in my handle's queue containing either CONTROL or "Hi there" 512:p.:hp2.Syntax::ehp2. :xph.GET WAIT CONTAINS CONTROL CONTAINS "Hi there":exph. 513:p. 514:li.:hp2.Goal::ehp2. Wait for, retrieve, and remove the highest priority message 515in my handle's queue containing type "MyProduct/Build/Complete" and containing 516the string "Version=1.2.0" from a machine whose endpoint contains system 517identifier buildserver.company.com (with any interface or port as indicated by 518wildcard *). Wait a maximum of 1 minute. 519:p.:hp2.Syntax::ehp2. :xph.GET WAIT 1m TYPE "MyProduct/Build/Complete" CONTAINS "Version=1.2.0" MACHINE "*://buildserver.company.com*":exph. 520:p. 521:li.:hp2.Goal::ehp2. Retrieve, but do not remove, all the messages in my handle's 522queue. 523:p.:hp2.Syntax::ehp2. :xph.PEEK ALL:exph. 524:p. 525:li.:hp2.Goal::ehp2. Retrieve and remove all the messages in my handle's queue. 526:p.:hp2.Syntax::ehp2. :xph.GET ALL:exph. 527:p. 528:li.:hp2.Goal::ehp2. Retrieve and remove the first 5 messages in my handle's queue. 529:p.:hp2.Syntax::ehp2. :xph.GET FIRST 5 WAIT:exph. 530:p. 531:li.:hp2.Goal::ehp2. Wait for, retrieve, and remove all messages in my handle's queue. 532:p.:hp2.Syntax::ehp2. :xph.GET ALL WAIT:exph. 533:p. 534:li.:hp2.Goal::ehp2. Wait for, retrieve, and remove all messages in my handle's queue 535with type "STAF/Process/Complete". 536:p.:hp2.Syntax::ehp2. :xph.GET ALL TYPE "STAF/Process/Complete" WAIT:exph. 537:eul. 538.* 539.*--------------------------------------------------------------------- 540.* 541:ih1.service commands 542:ih2.DELETE 543:i3.queue service 544:h3.DELETE 545:p.DELETE allows you to delete a set of messages from a queue. 546:h4.Syntax 547:xmp. 548DELETE &lbrk.PRIORITY <Priority>&rbrk.... &lbrk.MACHINE <Endpoint>&rbrk.... &lbrk.NAME <Name>&rbrk.... 549 &lbrk.HANDLE <Handle>&rbrk.... &lbrk.USER <User>&rbrk.... &lbrk.TYPE <Type>&rbrk.... 550 &lbrk.CONTAINS <String>&rbrk.... &lbrk.ICONTAINS <String>&rbrk.... 551:exmp. 552:p.:xph.PRIORITY:exph. specifies that you want to delete messages with the 553given priority. The default is any priority. You may specify this option 554multiple times. &varres. 555:p.:xph.MACHINE:exph. specifies that you want to delete messages originating 556from the given machine's endpoint. The default is any machine. You may 557specify this option multiple times. &varres. 558The format for a machine's endpoint is: 559:xmp. 560 <Interface>&colon.//<System Identifier>&lbrk.@<Port>&rbrk. 561:exmp. 562where a case-insensitive match is performed. 563You can specify match patterns (e.g. wild cards) for a machine's endpoint. 564These patterns recognize two special characters, '*' and '?', where '*' 565matches a string of characters (including an empty string) and '?' matches 566any single character (the empty string does not match). 567For example, if you want to match on messages from a machine with system 568identifier client1.mycompany.com, no matter what interface or port is in 569the machine's endpoint, you could specify "*://client1.mycompany.com*" 570which would match machines such as "tcp://client1.mycompany.com@6500" and 571"tcp2://client1.mycompany.com". 572:p.:xph.NAME:exph. specifies that you want to delete messages originating from 573a process with the given registered name. The default is any name. You may 574specify this option multiple times. &varres. 575:p.:xph.HANDLE:exph. specifies that you want to delete messages originating 576from a process with the given handle. The default is any handle. You may 577specify this option multiple times. &varres. 578:p.:xph.USER:exph. specifies that you want to delete messages originating 579from a process with a handle that has been authenticated 580with the specified user. The format for <User> is: 581:xmp. 582 <Authenticator>&colon.//<User Identifier> 583:exmp. 584where a case-insensitive match is performed on the <Authenticator> value and a 585case-sensitive match is performed on the <User Identifier> value. 586The default is any user. 587You may specify this option multiple times. &varres. 588:p.:xph.TYPE:exph. specifies that you want to delete messages 589with the given type. The match is case insensitive. 590You may specify this option multiple times. &varres. 591:p.:xph.CONTAINS:exph. specifies that you want to delete messages containing 592the given string. The search is case sensitive. The default is any 593message. You may specify this option multiple times. &varres. 594:p.:xph.ICONTAINS:exph. specifies that you want to delete messages containing 595the given string. The search is case insensitive. The default is any 596message. You may specify this option multiple times. &varres. 597:h4.Security 598:p.This command is only valid with respect to the submitting process' queue 599and if submitted to the local machine. 600 601:h4.Return Codes 602:p.All return codes from DELETE are documented in :hdref refid=retcode.. 603:h4.Results 604:p.The result buffer will contain the number of messages deleted. 605 606:h4.Examples 607:p. 608:ul. 609:li.:hp2.Goal::ehp2. Delete all messages from the local machine. 610:p.:hp2.Syntax::ehp2. :xph.DELETE MACHINE "local://local":exph. 611:p. 612:li.:hp2.Goal::ehp2. Delete all priority 3 messages from processes with registered 613name JavaTest1 614:p.:hp2.Syntax::ehp2. :xph.DELETE PRIORITY 3 NAME JavaTest1:exph. 615:p. 616:li.:hp2.Goal::ehp2. Delete all priority 3 and 4 messages from the machines 617referenced by variables Mach1 and Mach2 containing the string Stage2 or 618containing the string referenced by variable StringTest1. 619:p.:hp2.Syntax::ehp2. :xph.DELETE PRIORITY 3 PRIORITY 4 MACHINE {Mach1} MACHINE {Mach2} CONTAINS Stage2 CONTAINS {StringTest1}:exph. 620:p. 621:li.:hp2.Goal::ehp2. Delete all messages containing the string "Version=1.2.0" with 622type "MyProduct/Build/Complete" from a machine whose endpoint contains 623system identifier buildserver.company.com (with any interface or port 624as indicated by wildcard *). 625:p.:hp2.Syntax::ehp2. :xph.DELETE TYPE "MyProduct/Build/Complete" 626CONTAINS "Version=1.2.0" MACHINE "*://buildserver.company.com*":exph. 627:p. 628:li.:hp2.Goal::ehp2. Delete all messages in the queue. 629:p.:hp2.Syntax::ehp2. :xph.DELETE:exph. 630:eul. 631.* 632.*--------------------------------------------------------------------- 633.* 634:ih1.service commands 635:ih2.LIST 636:i3.queue service 637:h3.LIST 638:p.LIST allows you to retrieve the contents of the queue of a given handle. 639 640:h4.Syntax 641:xmp. 642LIST &lbrk.HANDLE <Handle>&rbrk. 643:exmp. 644:p.:xph.HANDLE:exph. specifies the handle of the process for which you want 645the queue contents. The default is the handle of the submitting process. This 646option will only default if the request was submitted locally. &varres. 647 648:h4.Security 649:p.&seclvl. 2. 650 651:h4.Return Codes 652:p.All return codes from LIST are documented in :hdref refid=retcode.. 653 654:h4.Results 655:p. 656On successful return, the result buffer will contain a marshalled 657:xph.<List> of <Map&colon.STAF/Service/Queue/Entry>:exph., representing 658the queued messages, sorted in ascending order by priority. 659The map is defined as follows: 660:table cols='* * * 2*'. 661:tcap.Definition of map class STAF/Service/Queue/Entry 662:tnote text='Description'.This map class represents a queued message. 663:thd. 664:c.Key Name 665:c.Display Name 666:c.Type 667:c.Format / Value 668:ethd. 669:row. 670:c.priority 671:c.Priority 672:c.&stringObj. 673:c. 674:row. 675:c.timestamp 676:c.Date-Time 677:c.&stringObj. 678:c.×tampFormat. 679:row. 680:c.machine 681:c.Machine 682:c.&stringObj. 683:c. 684:row. 685:c.handleName 686:c.Handle Name 687:c.&stringObj. | &noneObj. 688:c. 689:row. 690:c.handle 691:c.Handle 692:c.&stringObj. 693:c. 694:row. 695:c.type 696:c.Type 697:c.&stringObj. | &noneObj. 698:c. 699:row. 700:c.message 701:c.Message 702:c.<Any> 703:c.&maskPrivate. 704:etable. 705 706:h4.Examples 707:p. 708:ul. 709:li.:hp2.Goal::ehp2. Retrieve the contents of the submitting process' queue. 710:p.:hp2.Syntax::ehp2. :xph.LIST:exph. 711:p.:hp2.Result::ehp2. If the request is submitted from the 712command line, the result, in table format, could look like the following: 713:xmp. 714P Date-Time Machine Name H# User Type Message 715- --------- -------------- ------ -- -------- ---------- ------------------------ 7161 20040912- tcp://client1. STAF_P 1 none://a STAF/Start 717 13:56:10 austin.ibm.com rocess nonymous 718 @6500 7193 20040912- tcp://client3. JavaTe 36 none://a FVTTest CONTROL/STAGE2 720 14:01:52 austin.ibm.com st1 nonymous 7213 20040912- tcp://client2. STAF_P 1 none://a STAF/Start 722 14:02:17 austin.ibm.com rocess nonymous 723 @6500 7245 20040912- tcp://client3. JavaTe 36 none://a <None> This is a test message f 725 13:57:36 austin.ibm.com st1 nonymous rom Test1. Phase 2 has 726 @6500 completed. 727:exmp. 728:p. 729:li.:hp2.Goal::ehp2. Retrieve the contents of the process with handle 37. 730:p.:hp2.Syntax::ehp2. :xph.LIST HANDLE 37:exph. 731:p.:hp2.Result::ehp2. If the request is issued from the command line, the result, 732in verbose format, could look like: 733:xmp. 734[ 735 { 736 Priority : 5 737 Date-Time : 20050222-16:50:12 738 Machine : tcp://client1.austin.ibm.com@6500 739 Handle Name: STAF_Process 740 Handle : 1 741 User : none://anonymous 742 Type : STAF/Process/End 743 Message : { 744 endTimestamp: 20050222-16:50:12 745 fileList : [] 746 handle : 30 747 key : 748 rc : 0 749 } 750 } 751] 752:exmp. 753:eul. 754