public class JingleIQ
extends org.jivesoftware.smack.packet.IQ
JingleIQProvider
. It contains all the information
extracted from a jingle IQ.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_ATTR_NAME
The name of the argument that contains the jingle action value.
|
static java.lang.String |
ELEMENT_NAME
The name of the element that contains the jingle data.
|
static java.lang.String |
INITIATOR_ATTR_NAME
The name of the argument that contains the "initiator" jid.
|
static java.lang.String |
NAMESPACE
The name space that jingle belongs to.
|
static java.lang.String |
RESPONDER_ATTR_NAME
The name of the argument that contains the "responder" jid.
|
static java.lang.String |
SID_ATTR_NAME
The name of the argument that contains the session id.
|
Constructor and Description |
---|
JingleIQ() |
Modifier and Type | Method and Description |
---|---|
void |
addContent(ContentPacketExtension contentPacket)
Adds contentPacket to this IQ's content list.
|
boolean |
containsContentChildOfType(java.lang.Class<? extends org.jivesoftware.smack.packet.PacketExtension> contentType)
Determines if this packet contains a content with a child
matching the specified contentType.
|
static java.lang.String |
generateSID()
Generates a random String usable as a jingle session ID.
|
JingleAction |
getAction()
Returns the value of this element's action attribute.
|
java.lang.String |
getChildElementXML()
Returns the XML string of this Jingle IQ's "section" sub-element.
|
ContentPacketExtension |
getContentByName(java.lang.String contentName)
Finds ContentPacketExtension that matches given
contentName.
|
ContentPacketExtension |
getContentForType(java.lang.Class<? extends org.jivesoftware.smack.packet.PacketExtension> contentType)
Determines if this packet contains a content with a child
matching the specified contentType and returns it.
|
java.util.List<ContentPacketExtension> |
getContentList()
Returns a reference (and not a copy so be careful how you are handling
it) of this element's content list.
|
java.lang.String |
getInitiator()
Returns the full JID of the entity that has initiated the session flow.
|
ReasonPacketExtension |
getReason()
Returns this IQ's reason extension.
|
java.lang.String |
getResponder()
Returns the full JID of the entity that replies to a Jingle initiation.
|
SessionInfoPacketExtension |
getSessionInfo()
Returns a
SessionInfoPacketExtension if this JingleIQ
contains one and null otherwise. |
java.lang.String |
getSID()
Returns this element's session ID value.
|
void |
setAction(JingleAction action)
Sets the value of this element's action attribute.
|
void |
setInitiator(java.lang.String initiator)
Sets the full JID of the entity that has initiated the session flow.
|
void |
setReason(ReasonPacketExtension reason)
Specifies this IQ's reason extension.
|
void |
setResponder(java.lang.String responder)
Sets the full JID of the entity that replies to a Jingle initiation.
|
void |
setSessionInfo(SessionInfoPacketExtension si)
Sets si as the session info extension for this packet.
|
void |
setSID(java.lang.String sid)
Sets this element's session ID value.
|
createErrorResponse, createResultIQ, getType, setType, toXML
addExtension, deleteProperty, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, getXmlns, hashCode, nextID, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, setProperty, setTo
public static final java.lang.String NAMESPACE
public static final java.lang.String ELEMENT_NAME
public static final java.lang.String ACTION_ATTR_NAME
public static final java.lang.String INITIATOR_ATTR_NAME
public static final java.lang.String RESPONDER_ATTR_NAME
public static final java.lang.String SID_ATTR_NAME
public java.lang.String getChildElementXML()
getChildElementXML
in class org.jivesoftware.smack.packet.IQ
public void setSID(java.lang.String sid)
sid
- the session ID to setpublic java.lang.String getSID()
public static java.lang.String generateSID()
public void setResponder(java.lang.String responder)
responder
- the full JID of the session responder.public java.lang.String getResponder()
public void setInitiator(java.lang.String initiator)
initiator
- the full JID of the initiator.public java.lang.String getInitiator()
public void setAction(JingleAction action)
action
- the value of the action attribute.public JingleAction getAction()
public void setReason(ReasonPacketExtension reason)
reason
- this IQ's reason extension.public ReasonPacketExtension getReason()
public java.util.List<ContentPacketExtension> getContentList()
public void addContent(ContentPacketExtension contentPacket)
contentPacket
- the content packet extension we'd like to add to
this element's content list.public boolean containsContentChildOfType(java.lang.Class<? extends org.jivesoftware.smack.packet.PacketExtension> contentType)
RtpDescriptionPacketExtension
.contentType
- the type of the content child we are looking for.public ContentPacketExtension getContentForType(java.lang.Class<? extends org.jivesoftware.smack.packet.PacketExtension> contentType)
contentType
- the type of the content child we are looking for.public ContentPacketExtension getContentByName(java.lang.String contentName)
contentName
- the name of the content for which extension will be
returnedpublic void setSessionInfo(SessionInfoPacketExtension si)
si
- a SessionInfoPacketExtension
that we'd like to add
here.public SessionInfoPacketExtension getSessionInfo()
SessionInfoPacketExtension
if this JingleIQ
contains one and null otherwise.SessionInfoPacketExtension
if this JingleIQ
contains one and null otherwise.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.