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 : URI.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.address;
22:
23: import java.io.Serializable;
24:
25: /**
26: * This class represents a generic URI. This is the base interface for any
27: * type of URI. These are used in SIP requests to identify the callee and also
28: * in Contact, From, and To headers.
29: * <p>
30: * The generic syntax of URIs is defined in
31: * <a href = http://www.ietf.org/rfc/rfc2396.txt>RFC 2396</a>.
32: *
33: * @see TelURL
34: * @see SipURI
35: *
36: * @author BEA Systems, NIST
37: * @version 1.2
38: */
39:
40: public interface URI extends Cloneable, Serializable {
41:
42: /**
43: * Returns the value of the "scheme" of this URI, for example "sip", "sips"
44: * or "tel".
45: *
46: * @return the scheme paramter of the URI
47: */
48: public String getScheme();
49:
50: /**
51: * Creates and returns a deep copy of the URI. This methods must ensure a
52: * deep copy of the URI, so that when a URI is cloned the URI can be
53: * modified without effecting the original URI. This provides useful
54: * functionality for proxying Requests and Responses. This method overrides
55: * the clone method in java.lang.Object.
56: *
57: * @return a deep copy of URI
58: */
59: public Object clone();
60:
61: /**
62: * This method determines if this is a URI with a scheme of "sip" or "sips".
63: *
64: * @return true if the scheme is "sip" or "sips", false otherwise.
65: */
66: public boolean isSipURI();
67:
68: /**
69: * This method returns the URI as a string.
70: *
71: * @return String The stringified version of the URI
72: */
73: public String toString();
74:
75: }
|