Class Jingle


  • public final class Jingle
    extends Object
    • Method Detail

      • getInitiator

        public Jid getInitiator()
        Gets the initiator.

        The full JID of the entity that has initiated the session flow. When the Jingle action is "session-initiate", the <jingle/> element SHOULD possess an 'initiator' attribute that explicitly specifies the full JID of the initiating entity; for all other actions, the <jingle/> element SHOULD NOT possess an 'initiator' attribute and the recipient of the message SHOULD ignore the value if provided. The value of the 'initiator' attribute MAY be different from the 'from' address on the IQ-set of the session-initiate message (e.g., to handle certain interactions involving call managers, soft switches, and media relays). This usage shall be defined in other specifications, for example, in Jingle Session Transfer (XEP-0251). However, in all cases if the 'initiator' and 'from' values differ then the responder MUST NOT interact with the 'initiator' JID unless it trusts the 'initiator' JID or trusts that the 'from' JID is allowed to authorize the 'initiator' JID to act on the 'from' JID's behalf. In the absence of explicit rules for handling this case, the responder SHOULD simply ignore the 'initiator' attribute and treat the 'from' JID as the initiating entity. After sending acknowledgement of the session-initiate message, the responder MUST send all future commmunications about the Jingle session to the initiator (whether the initiator is considered the 'from' JID or the 'initiator' JID).

        Returns:
        The initiator.
      • getResponder

        public Jid getResponder()
        Gets the responder.

        The full JID of the entity that has replied to the initiation, which can be different from the 'to' address on the IQ-set. When the Jingle action is "session-accept", the <jingle/> element SHOULD possess a 'responder' attribute that explicitly specifies the full JID of the responding entity; for all other actions, the <jingle/> element SHOULD NOT possess a 'responder' attribute and the recipient of the message SHOULD ignore the value if provided. The value of the 'responder' attribute MAY be different from the 'from' address on the IQ-set of the session-accept message, where the logic for handling any difference between the 'responder' JID and the 'from' JID follows the same logic as for session-initiate messages (see above). After sending acknowledgement of the session-accept message, the initiator MUST send all future commmunications about this Jingle session to the responder (whether the responder is considered the 'from' JID or the 'responder' JID).

        Returns:
        The responder.
      • getSessionId

        public String getSessionId()
        Gets the session id.

        A random session identifier generated by the initiator, which effectively maps to the local-part of a SIP "Call-ID" parameter; this SHOULD match the XML Nmtoken production so that XML character escaping is not needed for characters such as '&'. In some situations the Jingle session identifier might have security implications. See RFC 4086 regarding requirements for randomness.

        Returns:
        The session id.
      • getContents

        public List<Jingle.Content> getContents()
        Gets the contents.
        Returns:
        The contents.
      • getReason

        public Jingle.Reason getReason()
        Gets the reason.
        Returns:
        The reason.
      • setReason

        public void setReason​(Jingle.Reason reason)
        Sets the reason.
        Parameters:
        reason - The reason.
      • getPayload

        public Object getPayload()