1 /* 2 * JBoss, Home of Professional Open Source 3 * This code has been contributed to the public domain. 4 * 5 * This software is provided by NIST as a service and is expressly 6 * provided "AS IS." NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED 7 * OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF 8 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT 9 * AND DATA ACCURACY. NIST does not warrant or make any representations 10 * regarding the use of the software or the results thereof, including but 11 * not limited to the correctness, accuracy, reliability or usefulness of 12 * the software. 13 * 14 * Permission to use this software is contingent upon your acceptance 15 * of the terms of this agreement. 16 */ 17 package gov.nist.javax.sip; 18 19 /** 20 * @author jean.deruelle@gmail.com 21 * 22 */ 23 public interface UtilsExt { 24 25 /** 26 * Generate a call identifier. This is useful when we want to generate a 27 * call identifier in advance of generating a message. 28 * @since 2.0 29 */ generateCallIdentifier(String address)30 public String generateCallIdentifier(String address); 31 32 /** 33 * Generate a tag for a FROM header or TO header. Just return a random 4 34 * digit integer (should be enough to avoid any clashes!) Tags only need to 35 * be unique within a call. 36 * 37 * @return a string that can be used as a tag parameter. 38 * 39 * synchronized: needed for access to 'rand', else risk to generate same tag 40 * twice 41 * @since 2.0 42 */ generateTag()43 public String generateTag(); 44 /** 45 * Generate a cryptographically random identifier that can be used to 46 * generate a branch identifier. 47 * 48 * @return a cryptographically random gloablly unique string that can be 49 * used as a branch identifier. 50 * @since 2.0 51 */ generateBranchId()52 public String generateBranchId(); 53 54 55 } 56