當前位置: 首頁>>代碼示例>>Java>>正文


Java TransportCandidate類代碼示例

本文整理匯總了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();
}
 
開發者ID:TTalkIM,項目名稱:Smack,代碼行數:21,代碼來源:JingleSession.java

示例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();

}
 
開發者ID:TTalkIM,項目名稱:Smack,代碼行數:27,代碼來源:JingleSession.java

示例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();
}
 
開發者ID:TTalkIM,項目名稱:Smack,代碼行數:22,代碼來源:JingleTransport.java

示例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;
}
 
開發者ID:TTalkIM,項目名稱:Smack,代碼行數:20,代碼來源:ScreenShareMediaManager.java

示例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;
}
 
開發者ID:TTalkIM,項目名稱:Smack,代碼行數:17,代碼來源:TestMediaManager.java

示例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;
}
 
開發者ID:TTalkIM,項目名稱:Smack,代碼行數:17,代碼來源:MultiMediaManager.java

示例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);
    }
 
開發者ID:TTalkIM,項目名稱:Smack,代碼行數:10,代碼來源:ContentNegotiator.java

示例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;
}
 
開發者ID:TTalkIM,項目名稱:Smack,代碼行數:17,代碼來源:JingleMediaSession.java

示例9: sessionEstablished

import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc, JingleSession jingleSession) {
}
 
開發者ID:TTalkIM,項目名稱:Smack,代碼行數:3,代碼來源:JingleManager.java

示例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;
    }
}
 
開發者ID:TTalkIM,項目名稱:Smack,代碼行數:11,代碼來源:JingleTransport.java

示例11: Candidate

import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; //導入依賴的package包/類
/**
 * Constructor with a transport candidate.
 */
public Candidate(final TransportCandidate tc) {
    super(tc);
}
 
開發者ID:TTalkIM,項目名稱:Smack,代碼行數:7,代碼來源:JingleTransport.java

示例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);
}
 
開發者ID:TTalkIM,項目名稱:Smack,代碼行數:12,代碼來源:JmfMediaManager.java

示例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();
}
 
開發者ID:TTalkIM,項目名稱:Smack,代碼行數:14,代碼來源:AudioMediaSession.java

示例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();
}
 
開發者ID:TTalkIM,項目名稱:Smack,代碼行數:14,代碼來源:ScreenShareSession.java

示例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);
}
 
開發者ID:TTalkIM,項目名稱:Smack,代碼行數:12,代碼來源:SpeexMediaManager.java


注:本文中的org.jivesoftware.smackx.jingleold.nat.TransportCandidate類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。