01: /*
02: * Connection.java
03: *
04: * Created on December 18, 2001, 4:20 PM
05: */
06:
07: package javax.sdp;
08:
09: /** A Connection represents the c= field associated with a SessionDescription or with an individual
10: * MediaDescription and is used to identify a network address on which media can be received.
11: *
12: * The Connection in the SessionDescription applies to all MediaDescriptions unless a
13: * MediaDescription specifically overrides it. The Connection identifies the network type (IN for internet),
14: * address type (IP4 or IP6), the start of an address range, the time to live of the session and the number of
15: * addresses in the range. Both the time to live and number of addresses are optional.
16: *
17: * A Connection could therefore be of one these forms:
18: *
19: * c=IN IP4 myhost.somewhere.com (no ttl and only one address)
20: * c=IN IP4 myhost.somewhere.com/5 (a ttl of 5)
21: * c=IN IP4 myhost.somewhere.com/5/2 (a ttl of 5 and 2 addresses)
22: *
23: * This implementation does not explicitly support ttl and number of addresses.
24: *
25: * Please refer to IETF RFC 2327 for a description of SDP.
26: *
27: * @author deruelle
28: * @version 1.0
29: */
30: public interface Connection extends Field {
31:
32: /** The Internet network type, "IN".
33: */
34: public static final String IN = "IN";
35:
36: /** The IPv4 address type, "IP4".
37: */
38: public static final String IP4 = "IP4";
39:
40: /** The IPv6 address type, "IP6".
41: */
42: public static final String IP6 = "IP6";
43:
44: /** Returns the type of the network for this Connection.
45: */
46: public String getAddress() throws SdpParseException;
47:
48: /** Returns the type of the address for this Connection.
49: */
50: public String getAddressType() throws SdpParseException;
51:
52: /**Returns the type of the network for this Connection.
53: */
54: public String getNetworkType() throws SdpParseException;
55:
56: /** Sets the type of the address for this Connection.
57: */
58: public void setAddress(String addr) throws SdpException;
59:
60: /** Returns the type of the network for this Connection.
61: */
62: public void setAddressType(String type) throws SdpException;
63:
64: /** Sets the type of the network for this Connection.
65: */
66: public void setNetworkType(String type) throws SdpException;
67:
68: }
|