• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 * Conditions Of Use
3 *
4 * This software was developed by employees of the National Institute of
5 * Standards and Technology (NIST), an agency of the Federal Government.
6 * Pursuant to title 15 Untied States Code Section 105, works of NIST
7 * employees are not subject to copyright protection in the United States
8 * and are considered to be in the public domain.  As a result, a formal
9 * license is not needed to use the software.
10 *
11 * This software is provided by NIST as a service and is expressly
12 * provided "AS IS."  NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
13 * OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
14 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
15 * AND DATA ACCURACY.  NIST does not warrant or make any representations
16 * regarding the use of the software or the results thereof, including but
17 * not limited to the correctness, accuracy, reliability or usefulness of
18 * the software.
19 *
20 * Permission to use this software is contingent upon your acceptance
21 * of the terms of this agreement
22 *
23 * .
24 *
25 */
26 /*******************************************************************************
27 * Product of NIST/ITL Advanced Networking Technologies Division (ANTD)         *
28 *******************************************************************************/
29 package gov.nist.javax.sip.parser;
30 import gov.nist.javax.sip.message.*;
31 import java.text.ParseException;
32 
33 /**
34  * A listener interface that enables customization of parse error handling.
35  * An class that implements this interface is registered with the
36  * parser and is called back from the parser handle parse errors.
37  *
38  * @version 1.2 $Revision: 1.7 $ $Date: 2009/07/17 18:58:01 $
39  */
40 public interface ParseExceptionListener {
41     /**
42      * This gets called from the parser when a parse error is generated.
43      * The handler is supposed to introspect on the error class and
44      * header name to handle the error appropriately. The error can
45      * be handled by :
46      *<ul>
47      * <li>1. Re-throwing an exception and aborting the parse.
48      * <li>2. Ignoring the header (attach the unparseable header to
49      * the SIPMessage being parsed).
50      * <li>3. Re-Parsing the bad header and adding it to the sipMessage
51      * </ul>
52      *
53      * @param  ex - parse exception being processed.
54      * @param  sipMessage -- sip message being processed.
55      * @param headerText --  header/RL/SL text being parsed.
56      * @param messageText -- message where this header was detected.
57      */
handleException( ParseException ex, SIPMessage sipMessage, Class headerClass, String headerText, String messageText)58     public void handleException(
59         ParseException ex,
60         SIPMessage sipMessage,
61         Class headerClass,
62         String headerText,
63         String messageText)
64         throws ParseException;
65 }
66 /*
67  * $Log: ParseExceptionListener.java,v $
68  * Revision 1.7  2009/07/17 18:58:01  emcho
69  * Converts indentation tabs to spaces so that we have a uniform indentation policy in the whole project.
70  *
71  * Revision 1.6  2006/07/13 09:01:55  mranga
72  * Issue number:
73  * Obtained from:
74  * Submitted by:  jeroen van bemmel
75  * Reviewed by:   mranga
76  * Moved some changes from jain-sip-1.2 to java.net
77  *
78  * CVS: ----------------------------------------------------------------------
79  * CVS: Issue number:
80  * CVS:   If this change addresses one or more issues,
81  * CVS:   then enter the issue number(s) here.
82  * CVS: Obtained from:
83  * CVS:   If this change has been taken from another system,
84  * CVS:   then name the system in this line, otherwise delete it.
85  * CVS: Submitted by:
86  * CVS:   If this code has been contributed to the project by someone else; i.e.,
87  * CVS:   they sent us a patch or a set of diffs, then include their name/email
88  * CVS:   address here. If this is your work then delete this line.
89  * CVS: Reviewed by:
90  * CVS:   If we are doing pre-commit code reviews and someone else has
91  * CVS:   reviewed your changes, include their name(s) here.
92  * CVS:   If you have not had it reviewed then delete this line.
93  *
94  * Revision 1.3  2006/06/19 06:47:27  mranga
95  * javadoc fixups
96  *
97  * Revision 1.2  2006/06/16 15:26:28  mranga
98  * Added NIST disclaimer to all public domain files. Clean up some javadoc. Fixed a leak
99  *
100  * Revision 1.1.1.1  2005/10/04 17:12:35  mranga
101  *
102  * Import
103  *
104  *
105  * Revision 1.4  2004/01/22 13:26:31  sverker
106  * Issue number:
107  * Obtained from:
108  * Submitted by:  sverker
109  * Reviewed by:   mranga
110  *
111  * Major reformat of code to conform with style guide. Resolved compiler and javadoc warnings. Added CVS tags.
112  *
113  * CVS: ----------------------------------------------------------------------
114  * CVS: Issue number:
115  * CVS:   If this change addresses one or more issues,
116  * CVS:   then enter the issue number(s) here.
117  * CVS: Obtained from:
118  * CVS:   If this change has been taken from another system,
119  * CVS:   then name the system in this line, otherwise delete it.
120  * CVS: Submitted by:
121  * CVS:   If this code has been contributed to the project by someone else; i.e.,
122  * CVS:   they sent us a patch or a set of diffs, then include their name/email
123  * CVS:   address here. If this is your work then delete this line.
124  * CVS: Reviewed by:
125  * CVS:   If we are doing pre-commit code reviews and someone else has
126  * CVS:   reviewed your changes, include their name(s) here.
127  * CVS:   If you have not had it reviewed then delete this line.
128  *
129  */
130