public class Jingle extends IQ
IQ.IQChildElementXmlStringBuilder, IQ.Type| Modifier and Type | Field and Description |
|---|---|
static String |
NAMESPACE |
static String |
NODENAME |
IQ_ELEMENT, QUERY_ELEMENTDEFAULT_LANGUAGE, ITEM, language, TEXT| Constructor and Description |
|---|
Jingle()
The default constructor
|
Jingle(JingleActionEnum action)
A constructor where the action can be specified.
|
Jingle(JingleContent content)
Constructor with a contents.
|
Jingle(JingleContentInfo info)
Constructor with a content info.
|
Jingle(List<JingleContent> contents,
JingleContentInfo mi,
String sid)
A constructor where the main components can be initialized.
|
Jingle(String sid)
A constructor where the session ID can be specified.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addContent(JingleContent content)
Add a new content.
|
void |
addContents(List<JingleContent> contentList)
Add a list of JingleContent elements
|
JingleActionEnum |
getAction()
Get the action specified in the packet
|
JingleContentInfo |
getContentInfo() |
Iterator<JingleContent> |
getContents()
Get an iterator for the contents
|
List<JingleContent> |
getContentsList()
Get an iterator for the content
|
static String |
getElementName()
Returns the XML element name of the extension sub-packet root element.
|
String |
getInitiator()
Get the initiator.
|
protected IQ.IQChildElementXmlStringBuilder |
getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder buf)
Return the XML representation of the packet.
|
static String |
getNamespace()
Returns the XML namespace of the extension sub-packet root element.
|
String |
getResponder()
Get the responder.
|
static int |
getSessionHash(String sid,
String initiator)
Get a hash key for the session this stanza(/packet) belongs to.
|
String |
getSid()
Returns the session ID related to the session.
|
void |
setAction(JingleActionEnum action)
Set the action in the packet
|
void |
setContentInfo(JingleContentInfo contentInfo) |
void |
setInitiator(String initiator)
Set the initiator.
|
void |
setResponder(String resp)
Set the responder.
|
void |
setSid(String sid)
Set the session ID related to this session.
|
createErrorResponse, createResultIQ, getChildElementName, getChildElementNamespace, getChildElementXML, getType, isRequestIQ, setType, toXMLaddCommonAttributes, addExtension, addExtensions, appendErrorIfExists, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensions, getExtensionsXML, getFrom, getLanguage, getPacketID, getStanzaId, getTo, hasExtension, hasExtension, hasStanzaIdSet, overrideExtension, removeExtension, removeExtension, setError, setFrom, setLanguage, setPacketID, setStanzaId, setTo, toStringpublic static final String NAMESPACE
public static final String NODENAME
public Jingle(List<JingleContent> contents, JingleContentInfo mi, String sid)
public Jingle(JingleContent content)
content - a contentpublic Jingle(JingleContentInfo info)
info - The content infopublic Jingle(JingleActionEnum action)
action - The action.public Jingle(String sid)
sid - The session ID related to the negotiation.setSid(String)public Jingle()
public final void setSid(String sid)
sid - the session IDpublic String getSid()
setSid(String)public static String getElementName()
public static String getNamespace()
public JingleContentInfo getContentInfo()
public void setContentInfo(JingleContentInfo contentInfo)
contentInfo - the audioInfo to setpublic Iterator<JingleContent> getContents()
public List<JingleContent> getContentsList()
public void addContent(JingleContent content)
content - the content to addpublic void addContents(List<JingleContent> contentList)
contentList - the list of contents to addpublic JingleActionEnum getAction()
public void setAction(JingleActionEnum action)
action - the action to setpublic String getInitiator()
public void setInitiator(String initiator)
initiator - the initiator to setpublic String getResponder()
public void setResponder(String resp)
resp - the responder to setpublic static int getSessionHash(String sid, String initiator)
sid - The session idinitiator - The initiatorprotected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder buf)
getIQChildElementBuilder in class IQbuf - a pre-created builder which already has the child element and the 'xmlns' attribute set.