当前位置: 首页>>代码示例>>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;未经允许,请勿转载。