001: /*
002: * Origin.java
003: *
004: * Created on December 20, 2001, 2:30 PM
005: */
006:
007: package javax.sdp;
008:
009: /**
010: * An Origin represents the o= fields contained within a SessionDescription.
011: *
012: * The Origin field identifies the originator of the session.
013: *
014: * This is not necessarily the same entity who is involved in the session.
015: *
016: * The Origin contains:
017: *
018: * the name of the user originating the session,
019: * a unique session identifier, and
020: * a unique version for the session.
021: *
022: * These fields should uniquely identify the session.
023: *
024: * The Origin also includes:
025: *
026: * the network type,
027: * address type, and
028: * address of the originator.
029: *
030: * Please refer to IETF RFC 2327 for a description of SDP.
031: * @author deruelle
032: * @version 1.0
033: */
034: public interface Origin extends Field {
035:
036: /** Returns the name of the session originator.
037: * @throws SdpParseException
038: * @return the string username.
039: */
040: public String getUsername() throws SdpParseException;
041:
042: /** Sets the name of the session originator.
043: * @param user the string username.
044: * @throws SdpException if the parameter is null
045: */
046: public void setUsername(String user) throws SdpException;
047:
048: /** Returns the unique identity of the session.
049: * @throws SdpParseException
050: * @return the session id.
051: */
052: public long getSessionId() throws SdpParseException;
053:
054: /** Sets the unique identity of the session.
055: * @param id the session id.
056: * @throws SdpException if the id is <0
057: */
058: public void setSessionId(long id) throws SdpException;
059:
060: /** Returns the unique version of the session.
061: * @throws SdpException
062: * @return the session version.
063: */
064: public long getSessionVersion() throws SdpParseException;
065:
066: /** Sets the unique version of the session.
067: * @param version the session version.
068: * @throws SdpException if the version is <0
069: */
070: public void setSessionVersion(long version) throws SdpException;
071:
072: /** Returns the type of the network for this Connection.
073: * @throws SdpParseException
074: * @return the string network type.
075: */
076: public String getAddress() throws SdpParseException;
077:
078: /** Returns the type of the address for this Connection.
079: * @throws SdpParseException
080: * @return the string address type.
081: */
082: public String getAddressType() throws SdpParseException;
083:
084: /** Returns the type of the network for this Connection
085: * @throws SdpParseException
086: * @return the string network type.
087: */
088: public String getNetworkType() throws SdpParseException;
089:
090: /** Sets the type of the address for this Connection.
091: * @param addr string address type.
092: * @throws SdpException if the addr is null
093: */
094: public void setAddress(String addr) throws SdpException;
095:
096: /** Returns the type of the network for this Connection.
097: * @param type the string network type.
098: * @throws SdpException if the type is null
099: */
100: public void setAddressType(String type) throws SdpException;
101:
102: /** Sets the type of the network for this Connection.
103: * @param type the string network type.
104: * @throws SdpException if the type is null
105: */
106: public void setNetworkType(String type) throws SdpException;
107: }
|