public class RTPBridge extends IQ
| Modifier and Type | Class and Description |
|---|---|
static class |
RTPBridge.Provider
IQProvider for RTP Bridge packets.
|
IQ.IQChildElementXmlStringBuilder, IQ.Type| Modifier and Type | Field and Description |
|---|---|
static String |
ELEMENT_NAME
Element name of the stanza(/packet) extension.
|
static String |
NAME
Element name of the stanza(/packet) extension.
|
static String |
NAMESPACE
Namespace of the stanza(/packet) extension.
|
IQ_ELEMENT, QUERY_ELEMENTDEFAULT_LANGUAGE, ITEM, language, TEXT| Constructor and Description |
|---|
RTPBridge()
Creates a RTPBridge Stanza(/Packet) without Session ID
|
RTPBridge(org.jivesoftware.smackx.jingleold.nat.RTPBridge.BridgeAction action)
Creates a RTPBridge Instance with defined Session ID
|
RTPBridge(String sid)
Creates a RTPBridge Instance with defined Session ID
|
RTPBridge(String sid,
org.jivesoftware.smackx.jingleold.nat.RTPBridge.BridgeAction bridgeAction)
Creates a RTPBridge Instance with defined Session ID
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAttributes()
Get the attributes string
|
String |
getHostA()
Get the Host A IP Address
|
String |
getHostB()
Get the Host B IP Address
|
String |
getIp()
Get the RTP Bridge IP
|
protected IQ.IQChildElementXmlStringBuilder |
getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder str)
Get the Child Element XML of the Packet
|
String |
getName()
Get the name of the Candidate
|
String |
getPass()
Get the RTP Agent Pass
|
int |
getPortA()
Get Side A receive port
|
int |
getPortB()
Get Side B receive port
|
static String |
getPublicIP(XMPPConnection xmppConnection)
Get Public Address from the Server.
|
static RTPBridge |
getRTPBridge(XMPPConnection connection,
String sessionID)
Get a new RTPBridge Candidate from the server.
|
String |
getSid()
Get the Session ID of the Stanza(/Packet) (usually same as Jingle Session ID)
|
static RTPBridge |
relaySession(XMPPConnection connection,
String sessionID,
String pass,
TransportCandidate proxyCandidate,
TransportCandidate localCandidate)
Check if the server support RTPBridge Service.
|
static boolean |
serviceAvailable(XMPPConnection connection)
Check if the server support RTPBridge Service.
|
void |
setHostA(String hostA)
Set the Host A IP Address
|
void |
setHostB(String hostB)
Set the Host B IP Address
|
void |
setIp(String ip)
Set the RTP Bridge IP
|
void |
setName(String name)
Set the name of the Candidate
|
void |
setPass(String pass)
Set the RTP Agent Pass
|
void |
setPortA(int portA)
Set Side A receive port
|
void |
setPortB(int portB)
Set Side B receive port
|
void |
setSid(String sid)
Set the Session ID of the Stanza(/Packet) (usually same as Jingle Session ID)
|
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 NAME
public static final String ELEMENT_NAME
public static final String NAMESPACE
public RTPBridge(String sid)
sid - public RTPBridge(org.jivesoftware.smackx.jingleold.nat.RTPBridge.BridgeAction action)
action - public RTPBridge(String sid, org.jivesoftware.smackx.jingleold.nat.RTPBridge.BridgeAction bridgeAction)
sid - bridgeAction - public RTPBridge()
public String getAttributes()
public String getSid()
public void setSid(String sid)
sid - public int getPortA()
public void setPortA(int portA)
portA - public int getPortB()
public void setPortB(int portB)
portB - protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder str)
getIQChildElementBuilder in class IQstr - a pre-created builder which already has the child element and the 'xmlns' attribute set.public static RTPBridge getRTPBridge(XMPPConnection connection, String sessionID) throws SmackException.NotConnectedException
connection - sessionID - SmackException.NotConnectedExceptionpublic static boolean serviceAvailable(XMPPConnection connection) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException
connection - XMPPException.XMPPErrorExceptionSmackException.NoResponseExceptionSmackException.NotConnectedExceptionpublic static RTPBridge relaySession(XMPPConnection connection, String sessionID, String pass, TransportCandidate proxyCandidate, TransportCandidate localCandidate) throws SmackException.NotConnectedException
connection - SmackException.NotConnectedExceptionpublic static String getPublicIP(XMPPConnection xmppConnection) throws SmackException.NotConnectedException
xmppConnection - SmackException.NotConnectedException