01: /**
02: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
03: * Unpublished - rights reserved under the Copyright Laws of the United States.
04: * Copyright © 2003 Sun Microsystems, Inc. All rights reserved.
05: * Copyright © 2005 BEA Systems, Inc. All rights reserved.
06: *
07: * Use is subject to license terms.
08: *
09: * This distribution may include materials developed by third parties.
10: *
11: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12: *
13: * Module Name : JSIP Specification
14: * File Name : Parameters.java
15: * Author : Phelim O'Doherty
16: *
17: * HISTORY
18: * Version Date Author Comments
19: * 1.1 08/10/2002 Phelim O'Doherty Initial version
20: *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21: */package javax.sip.header;
22:
23: import java.text.ParseException;
24: import java.util.Iterator;
25:
26: /**
27: * This interface defines methods for accessing generic parameters for
28: * Headers that contain generic parameter values.
29: *
30: * @author BEA Systems, NIST
31: * @version 1.2
32: */
33: public interface Parameters {
34:
35: /**
36: * Returns the value of the named parameter, or null if it is not set. A
37: * zero-length String indicates flag parameter.
38: *
39: * @param name name of parameter to retrieve
40: * @return the value of specified parameter
41: */
42: public String getParameter(String name);
43:
44: /**
45: * Sets the value of the specified parameter. If the parameter already had
46: * a value it will be overwritten. A zero-length String indicates flag
47: * parameter.
48: *
49: * @param name - a String specifying the parameter name
50: * @param value - a String specifying the parameter value
51: * @throws ParseException which signals that an error has been reached
52: * unexpectedly while parsing the parameter name or value.
53: */
54: public void setParameter(String name, String value)
55: throws ParseException;
56:
57: /**
58: * Returns an Iterator over the names (Strings) of all parameters present
59: * in this ParametersHeader.
60: *
61: * @return an Iterator over all the parameter names
62: */
63: public Iterator getParameterNames();
64:
65: /**
66: * Removes the specified parameter from Parameters of this ParametersHeader.
67: * This method returns silently if the parameter is not part of the
68: * ParametersHeader.
69: *
70: * @param name - a String specifying the parameter name
71: */
72: public void removeParameter(String name);
73:
74: }
|