public class Jingle extends IQ
Modifier and Type | Field and Description |
---|---|
static String |
NAMESPACE |
static 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(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
|
String |
getChildElementXML()
Return the XML representation of 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.
|
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 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, 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 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 initiatorpublic String getChildElementXML()
getChildElementXML
in class IQ