/**
  * Creates a new <tt>ContentPacketExtension</tt>. instance with only required parameters.
  *
  * @param creator indicates which party originally generated the content type
  * @param disposition indicates how the content definition is to be interpreted by the recipient
  * @param name the content type according to the creator
  * @param senders the parties in the session will be generating content.
  */
 public ContentPacketExtension(
     CreatorEnum creator, String disposition, String name, SendersEnum senders) {
   super(null, ELEMENT_NAME);
   super.setAttribute(CREATOR_ATTR_NAME, creator);
   super.setAttribute(DISPOSITION_ATTR_NAME, disposition);
   super.setAttribute(NAME_ATTR_NAME, name);
   super.setAttribute(SENDERS_ATTR_NAME, senders);
 }
예제 #2
0
  /**
   * Adds the specified <tt>childExtension</tt> to the list of extensions registered with this
   * packet.
   *
   * <p>Overriding extensions may need to override this method if they would like to have anything
   * more elaborate than just a list of extensions (e.g. casting separate instances to more
   * specific.
   *
   * @param childExtension the extension we'd like to add here.
   */
  @Override
  public void addChildExtension(PacketExtension childExtension) {
    super.addChildExtension(childExtension);

    if (childExtension instanceof CryptoPacketExtension) {
      this.addCrypto(((CryptoPacketExtension) childExtension));
    }
  }
 /**
  * Creates a new <tt>ContentPacketExtension</tt> instance with the specified parameters.
  *
  * @param creator indicates which party originally generated the content type interpreted by the
  *     recipient
  * @param name the content type according to the creator
  */
 public ContentPacketExtension(CreatorEnum creator, String name) {
   super(null, ELEMENT_NAME);
   super.setAttribute(CREATOR_ATTR_NAME, creator);
   super.setAttribute(NAME_ATTR_NAME, name);
 }
예제 #4
0
 /**
  * Sets the value of this bandwidth extension.
  *
  * @param bw the value of this bandwidth extension.
  */
 public void setBandwidth(String bw) {
   super.setText(bw);
 }
예제 #5
0
 /**
  * Sets the value of the <tt>crypto-suite</tt> attribute: an identifier that describes the
  * encryption and authentication algorithms.
  *
  * @param cryptoSuite a <tt>String</tt> that describes the encryption and authentication
  *     algorithms.
  */
 public void setCryptoSuite(String cryptoSuite) {
   super.setAttribute(CRYPTO_SUITE_ATTR_NAME, cryptoSuite);
 }
예제 #6
0
 /**
  * Sets the value of the <tt>tag</tt> attribute: a decimal number used as an identifier for a
  * particular crypto element.
  *
  * @param tag a <tt>String</tt> containing a decimal number used as an identifier for a particular
  *     crypto element.
  */
 public void setTag(String tag) {
   super.setAttribute(TAG_ATTR_NAME, tag);
 }
예제 #7
0
 /**
  * Sets the value of the <tt>session-params</tt> attribute that provides transport-specific
  * parameters for SRTP negotiation.
  *
  * @param sessionParams a <tt>String</tt> that provides transport-specific parameters for SRTP
  *     negotiation.
  */
 public void setSessionParams(String sessionParams) {
   super.setAttribute(SESSION_PARAMS_ATTR_NAME, sessionParams);
 }
예제 #8
0
 /**
  * Sets the value of the <tt>key-params</tt> attribute that provides one or more sets of keying
  * material for the crypto-suite in question).
  *
  * @param keyParams a <tt>String</tt> that provides one or more sets of keying material for the
  *     crypto-suite in question.
  */
 public void setKeyParams(String keyParams) {
   super.setAttribute(KEY_PARAMS_ATTR_NAME, keyParams);
 }
예제 #9
0
 /**
  * Specifies whether encryption is required for this session or not.
  *
  * @param required <tt>true</tt> if encryption is required for this session and <tt>false</tt>
  *     otherwise.
  */
 public void setRequired(boolean required) {
   if (required) super.setAttribute(REQUIRED_ATTR_NAME, required);
   else super.removeAttribute(REQUIRED_ATTR_NAME);
 }