本文整理匯總了Java中org.jivesoftware.smackx.jingleold.nat.TransportCandidate類的典型用法代碼示例。如果您正苦於以下問題:Java TransportCandidate類的具體用法?Java TransportCandidate怎麽用?Java TransportCandidate使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
TransportCandidate類屬於org.jivesoftware.smackx.jingleold.nat包,在下文中一共展示了TransportCandidate類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: triggerSessionClosedOnError
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
/**
* Trigger a session closed event due to an error.
*/
protected void triggerSessionClosedOnError(XMPPException exc) {
for (ContentNegotiator contentNegotiator : contentNegotiators) {
contentNegotiator.stopJingleMediaSession();
for (TransportCandidate candidate : contentNegotiator.getTransportNegotiator().getOfferedCandidates())
candidate.removeCandidateEcho();
}
List<JingleListener> listeners = getListenersList();
for (JingleListener li : listeners) {
if (li instanceof JingleSessionListener) {
JingleSessionListener sli = (JingleSessionListener) li;
sli.sessionClosedOnError(exc, this);
}
}
close();
}
示例2: close
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
/**
* Terminate negotiations.
*/
public void close() {
if (isClosed())
return;
// Set the session state to ENDED.
setSessionState(JingleSessionStateEnded.getInstance());
for (ContentNegotiator contentNegotiator : contentNegotiators) {
contentNegotiator.stopJingleMediaSession();
for (TransportCandidate candidate : contentNegotiator.getTransportNegotiator().getOfferedCandidates())
candidate.removeCandidateEcho();
contentNegotiator.close();
}
removeAsyncPacketListener();
removeConnectionListener();
getConnection().removeConnectionListener(connectionListener);
LOGGER.fine("Negotiation Closed: " + getConnection().getUser() + " " + sid);
super.close();
}
示例3: getChildElements
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
/**
* Get the elements of this candidate.
*/
protected String getChildElements() {
StringBuilder buf = new StringBuilder();
if (transportCandidate != null && transportCandidate instanceof TransportCandidate.Fixed) {
TransportCandidate.Fixed tcf = (TransportCandidate.Fixed) transportCandidate;
buf.append(" generation=\"").append(tcf.getGeneration()).append("\"");
buf.append(" ip=\"").append(tcf.getIp()).append("\"");
buf.append(" port=\"").append(tcf.getPort()).append("\"");
// Optional parameters
String name = tcf.getName();
if (name != null) {
buf.append(" name=\"").append(name).append("\"");
}
}
return buf.toString();
}
示例4: createMediaSession
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
/**
* Returns a new JingleMediaSession
*
* @param payloadType payloadType
* @param remote remote Candidate
* @param local local Candidate
* @return JingleMediaSession JingleMediaSession
*/
public JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final JingleSession jingleSession) {
ScreenShareSession session = null;
session = new ScreenShareSession(payloadType, remote, local, "Screen", jingleSession);
if (encoder != null) {
session.setEncoder(encoder);
}
if (decoder != null) {
session.setDecoder(decoder);
}
return session;
}
示例5: createMediaSession
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
/**
* Returns a new JingleMediaSession
*
* @param payloadType payloadType
* @param remote remote Candidate
* @param local local Candidate
* @return JingleMediaSession JingleMediaSession
*/
public JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote,
final TransportCandidate local, final JingleSession jingleSession) {
TestMediaSession session = null;
session = new TestMediaSession(payloadType, remote, local, "", jingleSession);
return session;
}
示例6: createMediaSession
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
/**
* Returns a new JingleMediaSession
*
* @param payloadType payloadType
* @param remote remote Candidate
* @param local local Candidate
* @return JingleMediaSession JingleMediaSession
*/
public JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final JingleSession jingleSession) {
for (JingleMediaManager manager : managers) {
if (manager.getPayloads().contains(payloadType)) {
return manager.createMediaSession(payloadType, remote, local, jingleSession);
}
}
return null;
}
示例7: triggerContentEstablished
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
public void triggerContentEstablished() throws NotConnectedException {
PayloadType bestCommonAudioPt = getMediaNegotiator().getBestCommonAudioPt();
TransportCandidate bestRemoteCandidate = getTransportNegotiator().getBestRemoteCandidate();
TransportCandidate acceptedLocalCandidate = getTransportNegotiator().getAcceptedLocalCandidate();
// Trigger the session established flag
triggerContentEstablished(bestCommonAudioPt, bestRemoteCandidate, acceptedLocalCandidate);
}
示例8: JingleMediaSession
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
/**
* Creates a new JingleMediaSession Instance to handle Media methods.
*
* @param payloadType Payload Type of the transmittion
* @param remote Remote accepted Transport Candidate
* @param local Local accepted Transport Candidate
* @param mediaLocator Media Locator of the capture device
*/
public JingleMediaSession(PayloadType payloadType, TransportCandidate remote,
TransportCandidate local, String mediaLocator, JingleSession jingleSession) {
this.local = local;
this.remote = remote;
this.payloadType = payloadType;
this.mediaLocator = mediaLocator;
this.jingleSession = jingleSession;
}
示例9: sessionEstablished
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc, JingleSession jingleSession) {
}
示例10: setMediaTransport
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
/**
* Set the transportElement candidate.
*
* @param cand the transportElement candidate
*/
public void setMediaTransport(final TransportCandidate cand) {
if (cand != null) {
transportCandidate = cand;
}
}
示例11: Candidate
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
/**
* Constructor with a transport candidate.
*/
public Candidate(final TransportCandidate tc) {
super(tc);
}
示例12: createMediaSession
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
/**
* Returns a new jingleMediaSession
*
* @param payloadType payloadType
* @param remote remote Candidate
* @param local local Candidate
* @return JingleMediaSession
*/
public JingleMediaSession createMediaSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final JingleSession jingleSession) {
return new AudioMediaSession(payloadType, remote, local, mediaLocator, jingleSession);
}
示例13: AudioMediaSession
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
/**
* Creates a org.jivesoftware.jingleaudio.jmf.AudioMediaSession with defined payload type, remote and local candidates
*
* @param payloadType Payload of the jmf
* @param remote the remote information. The candidate that the jmf will be sent to.
* @param local the local information. The candidate that will receive the jmf
* @param locator media locator
*/
public AudioMediaSession(final PayloadType payloadType, final TransportCandidate remote,
final TransportCandidate local, String locator, JingleSession jingleSession) {
super(payloadType, remote, local, locator==null?"dsound://":locator,jingleSession);
initialize();
}
示例14: ScreenShareSession
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
/**
* Creates a org.jivesoftware.jingleaudio.jmf.AudioMediaSession with defined payload type, remote and local candidates
*
* @param payloadType Payload of the jmf
* @param remote the remote information. The candidate that the jmf will be sent to.
* @param local the local information. The candidate that will receive the jmf
* @param locator media locator
*/
public ScreenShareSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local,
final String locator, JingleSession jingleSession) {
super(payloadType, remote, local, "Screen", jingleSession);
initialize();
}
示例15: createMediaSession
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
/**
* Returns a new jingleMediaSession
*
* @param payloadType payloadType
* @param remote remote Candidate
* @param local local Candidate
* @return JingleMediaSession
*/
public JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final JingleSession jingleSession) {
return new AudioMediaSession(payloadType, remote, local, null,null);
}