public class Jingle extends IQ
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAMESPACE |
static java.lang.String |
NODENAME |
DEFAULT_LANGUAGE, ID_NOT_AVAILABLE
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(java.util.List<JingleContent> contents,
JingleContentInfo mi,
java.lang.String sid)
A constructor where the main components can be initialized.
|
Jingle(java.lang.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(java.util.List<JingleContent> contentList)
Add a list of JingleContent elements
|
JingleActionEnum |
getAction()
Get the action specified in the packet
|
java.lang.String |
getChildElementXML()
Return the XML representation of the packet.
|
JingleContentInfo |
getContentInfo() |
java.util.Iterator<JingleContent> |
getContents()
Get an iterator for the contents
|
java.util.List<JingleContent> |
getContentsList()
Get an iterator for the content
|
static java.lang.String |
getElementName()
Returns the XML element name of the extension sub-packet root element.
|
java.lang.String |
getInitiator()
Get the initiator.
|
static java.lang.String |
getNamespace()
Returns the XML namespace of the extension sub-packet root element.
|
java.lang.String |
getResponder()
Get the responder.
|
static int |
getSessionHash(java.lang.String sid,
java.lang.String initiator)
Get a hash key for the session this packet belongs to.
|
java.lang.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(java.lang.String initiator)
Set the initiator.
|
void |
setResponder(java.lang.String resp)
Set the responder.
|
void |
setSid(java.lang.String sid)
Set the session ID related to this session.
|
createErrorResponse, createResultIQ, getType, setType, toXML
addCommonAttributes, addExtension, addExtensions, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getTo, getXmlns, hashCode, nextID, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, setTo, toString
public static final java.lang.String NAMESPACE
public static final java.lang.String NODENAME
public Jingle(java.util.List<JingleContent> contents, JingleContentInfo mi, java.lang.String sid)
public Jingle(JingleContent content)
content
- a contentpublic Jingle(JingleContentInfo info)
info
- The content infopublic Jingle(JingleActionEnum action)
action
- The action.public Jingle(java.lang.String sid)
sid
- The session ID related to the negotiation.setSid(String)
public Jingle()
public final void setSid(java.lang.String sid)
sid
- the session IDpublic java.lang.String getSid()
setSid(String)
public static java.lang.String getElementName()
public static java.lang.String getNamespace()
public JingleContentInfo getContentInfo()
public void setContentInfo(JingleContentInfo contentInfo)
contentInfo
- the audioInfo to setpublic java.util.Iterator<JingleContent> getContents()
public java.util.List<JingleContent> getContentsList()
public void addContent(JingleContent content)
content
- the content to addpublic void addContents(java.util.List<JingleContent> contentList)
contentList
- the list of contents to addpublic JingleActionEnum getAction()
public void setAction(JingleActionEnum action)
action
- the action to setpublic java.lang.String getInitiator()
public void setInitiator(java.lang.String initiator)
initiator
- the initiator to setpublic java.lang.String getResponder()
public void setResponder(java.lang.String resp)
resp
- the responder to setpublic static int getSessionHash(java.lang.String sid, java.lang.String initiator)
sid
- The session idinitiator
- The initiatorpublic java.lang.String getChildElementXML()
getChildElementXML
in class IQ