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 : AllowHeader.java
15: * Author : Phelim O'Doherty
16: *
17: * HISTORY
18: * Version Date Author Comments
19: * 1.1 08/10/2002 Phelim O'Doherty
20: *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21: */package javax.sip.header;
22:
23: import java.text.ParseException;
24:
25: /**
26: * The Allow header field lists the set of methods supported by the User Agent
27: * generating the message. All methods, including ACK and CANCEL, understood
28: * by the User Agent MUST be included in the list of methods in the Allow header
29: * field, when present.
30: * The absence of an Allow header field MUST NOT be interpreted to mean that
31: * the User Agent sending the message supports no methods. Rather, it implies
32: * that the User Agent is not providing any information on what methods it
33: * supports. Supplying an Allow header field in responses to methods other than
34: * OPTIONS reduces the number of messages needed.
35: * <p>
36: * For Example:<br>
37: * <code>Allow: INVITE, ACK, OPTIONS, CANCEL, BYE</code>
38: *
39: * @author BEA Systems, NIST
40: * @version 1.2
41: */
42: public interface AllowHeader extends Header {
43:
44: /**
45: * Sets the Allow header value. The argument may be a single method name
46: * (eg "ACK") or a comma delimited list of method names
47: * (eg "ACK, CANCEL, INVITE").
48: *
49: * @param method - the String defining the method supported
50: * in this AllowHeader
51: * @throws ParseException which signals that an error has been reached
52: * unexpectedly while parsing the method supported.
53: */
54: public void setMethod(String method) throws ParseException;
55:
56: /**
57: * Gets the method of the AllowHeader. Returns null if no method is
58: * defined in this Allow Header.
59: *
60: * @return the string identifing the method of AllowHeader.
61: */
62: public String getMethod();
63:
64: /**
65: * Name of AllowHeader
66: */
67: public final static String NAME = "Allow";
68:
69: }
|