Debian Codegraph @

java/gov/nist/javax/sip/message/SIPDuplicateHeaderException.java

raw
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.message;
30
31 import gov.nist.javax.sip.header.*;
32 import java.text.ParseException;
33
34 /**
35 * Duplicate header exception: thrown when there is more
36 * than one header of a type where there should only be one.
37 * The exception handler may choose to :
38 * 1. discard the duplicate by returning null
39 * 2. keep the duplicate by just returning it.
40 * 3. Discard the entire message by throwing an exception.
41 * @version 1.2 $Revision: 1.6 $ $Date: 2009/07/17 18:57:54 $
42 * @since 1.1
43 * @author M. Ranganathan
44 */
45 public class SIPDuplicateHeaderException extends ParseException {
46
47 private static final long serialVersionUID = 8241107266407879291L;
48 protected SIPHeader sipHeader;
49 protected SIPMessage sipMessage;
50 public SIPDuplicateHeaderException(String msg) {
51 super(msg, 0);
52 }
53 public SIPMessage getSIPMessage() {
54 return sipMessage;
55 }
56
57 public SIPHeader getSIPHeader() {
58 return sipHeader;
59 }
60
61 public void setSIPHeader(SIPHeader sipHeader) {
62 this.sipHeader = sipHeader;
63 }
64
65 public void setSIPMessage(SIPMessage sipMessage) {
66 this.sipMessage = sipMessage;
67 }
68 }