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 extension.
|
static String |
NAME
Element name of the stanza extension.
|
static String |
NAMESPACE
Namespace of the stanza extension.
|
IQ_ELEMENT, QUERY_ELEMENT
DEFAULT_LANGUAGE, ITEM, language, TEXT
Constructor and Description |
---|
RTPBridge()
Creates a RTPBridge Stanza 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 (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 (usually same as Jingle Session ID).
|
createErrorResponse, createErrorResponse, createErrorResponse, createResultIQ, getChildElementName, getChildElementNamespace, getChildElementXML, getChildElementXML, getType, initializeAsResultFor, initialzeAsResultFor, isRequestIQ, setType, toString, toXML
addCommonAttributes, addExtension, addExtensions, appendErrorIfExists, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensions, getFrom, getLanguage, getPacketID, getStanzaId, getTo, hasExtension, hasExtension, hasStanzaIdSet, logCommonAttributes, overrideExtension, removeExtension, removeExtension, setError, setError, setFrom, setFrom, setLanguage, setPacketID, setStanzaId, setStanzaId, setTo, setTo
public 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 IQ
str
- 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, InterruptedException
connection
- sessionID
- SmackException.NotConnectedException
InterruptedException
public static boolean serviceAvailable(XMPPConnection connection) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
connection
- XMPPException.XMPPErrorException
SmackException.NoResponseException
SmackException.NotConnectedException
InterruptedException
public static RTPBridge relaySession(XMPPConnection connection, String sessionID, String pass, TransportCandidate proxyCandidate, TransportCandidate localCandidate) throws SmackException.NotConnectedException, InterruptedException
connection
- SmackException.NotConnectedException
InterruptedException
public static String getPublicIP(XMPPConnection xmppConnection) throws SmackException.NotConnectedException, InterruptedException
xmppConnection
- SmackException.NotConnectedException
InterruptedException