Example #1
0
 /**
  * Returns Origin object with the specified properties.
  *
  * @param userName the user name.
  * @param address the IP4 encoded address.
  * @throws SdpException if the parameters are null
  * @return Origin
  */
 public Origin createOrigin(String userName, String address) throws SdpException {
   OriginField originImpl = new OriginField();
   originImpl.setUsername(userName);
   originImpl.setAddress(address);
   originImpl.setNetworkType(SDPKeywords.IN);
   originImpl.setAddressType(SDPKeywords.IPV4);
   return originImpl;
 }
Example #2
0
 /**
  * Returns Origin object with the specified properties.
  *
  * @param userName String containing the user that created the string.
  * @param sessionId long containing the session identifier.
  * @param sessionVersion long containing the session version.
  * @param networkType String network type for the origin (usually "IN").
  * @param addrType String address type (usually "IP4").
  * @param address String IP address usually the address of the host.
  * @throws SdpException if the parameters are null
  * @return Origin object with the specified properties.
  */
 public Origin createOrigin(
     String userName,
     long sessionId,
     long sessionVersion,
     String networkType,
     String addrType,
     String address)
     throws SdpException {
   OriginField originImpl = new OriginField();
   originImpl.setUsername(userName);
   originImpl.setAddress(address);
   originImpl.setSessionId(sessionId);
   originImpl.setSessionVersion(sessionVersion);
   originImpl.setAddressType(addrType);
   originImpl.setNetworkType(networkType);
   return originImpl;
 }