001/**
002 *
003 * Copyright 2003-2006 Jive Software.
004 *
005 * Licensed under the Apache License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 *     http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.jivesoftware.smackx.jingleold.nat;
018
019import org.jivesoftware.smack.XMPPException;
020import org.jivesoftware.smackx.jingleold.JingleSession;
021import org.jivesoftware.smackx.jingleold.listeners.CreatedJingleSessionListener;
022import org.jivesoftware.smackx.jingleold.listeners.JingleSessionListener;
023import org.jivesoftware.smackx.jingleold.media.PayloadType;
024
025/**
026 * A Fixed Jingle Transport Manager implementation.
027 *  
028 */
029public class FixedTransportManager extends JingleTransportManager implements JingleSessionListener, CreatedJingleSessionListener {
030
031    FixedResolver resolver;
032
033    public FixedTransportManager(FixedResolver inResolver) {
034        resolver = inResolver;
035    }
036
037    @Override
038    protected TransportResolver createResolver(JingleSession session) {
039        return resolver;
040    }
041
042    @Override
043    public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc, JingleSession jingleSession) {
044    }
045
046    @Override
047    public void sessionDeclined(String reason, JingleSession jingleSession) {
048    }
049
050    @Override
051    public void sessionRedirected(String redirection, JingleSession jingleSession) {
052    }
053
054    @Override
055    public void sessionClosed(String reason, JingleSession jingleSession) {
056    }
057
058    @Override
059    public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {
060    }
061
062    @Override
063    public void sessionMediaReceived(JingleSession jingleSession, String participant) {
064        // Do Nothing
065    }
066
067    @Override
068    public void sessionCreated(JingleSession jingleSession) {
069        jingleSession.addListener(this);
070    }
071}