1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-27 14:47:59 +01:00

Code Refactoring and Fixes

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@7363 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Thiago Camargo 2007-03-03 05:20:17 +00:00 committed by thiago
parent 76bd42da26
commit 3c455c8367
36 changed files with 420 additions and 29 deletions

View file

@ -80,6 +80,7 @@ import java.util.List;
* JingleManager class, that will create the appropiate instance...
*
* @author Alvaro Saurin
* @author Thiago Camargo
*/
public class IncomingJingleSession extends JingleSession {

View file

@ -25,7 +25,9 @@ import org.jivesoftware.smack.filter.PacketFilter;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.packet.PacketExtension;
import org.jivesoftware.smack.provider.ProviderManager;
import org.jivesoftware.smack.provider.PacketExtensionProvider;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smackx.ServiceDiscoveryManager;
import org.jivesoftware.smackx.jingle.listeners.CreatedJingleSessionListener;
@ -40,6 +42,8 @@ import org.jivesoftware.smackx.jingle.nat.TransportCandidate;
import org.jivesoftware.smackx.jingle.nat.TransportResolver;
import org.jivesoftware.smackx.packet.DiscoverInfo;
import org.jivesoftware.smackx.packet.Jingle;
import org.jivesoftware.smackx.packet.JingleError;
import org.xmlpull.v1.XmlPullParser;
import java.util.ArrayList;
import java.util.Collection;
@ -267,8 +271,7 @@ public class JingleManager implements JingleSessionListener {
JingleSession aux = null;
for (JingleSession jingleSession : jingleSessions) {
if (jingleSession.getInitiator().equals(xmppAddress) ||
jingleSession.getResponder().equals(xmppAddress))
{
jingleSession.getResponder().equals(xmppAddress)) {
aux = jingleSession;
}
}
@ -673,7 +676,7 @@ public class JingleManager implements JingleSessionListener {
if (jingleMediaManager != null)
return createIncomingJingleSession(request, jingleMediaManager.getPayloads());
return createIncomingJingleSession(request,null);
return createIncomingJingleSession(request, null);
}
/**

View file

@ -1,3 +1,22 @@
/**
* $RCSfile$
* $Revision: 7329 $
* $Date: 2007-02-28 20:59:28 -0300 (qua, 28 fev 2007) $
*
* Copyright 2003-2005 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.jingle;
import org.jivesoftware.smack.XMPPConnection;

View file

@ -501,7 +501,6 @@ public abstract class JingleSession extends JingleNegotiator {
// Notify the session end and close everything...
triggerSessionClosedOnError(e);
close();
}
}
@ -558,6 +557,7 @@ public abstract class JingleSession extends JingleNegotiator {
perror.addExtension(error);
getConnection().sendPacket(perror);
System.err.println(error.toXML());
}
return perror;
}
@ -1022,6 +1022,7 @@ public abstract class JingleSession extends JingleNegotiator {
sli.sessionClosed(reason, this);
}
}
close();
if (jingleMediaSession != null) {
jingleMediaSession.stopTrasmit();
jingleMediaSession.stopReceive();
@ -1041,6 +1042,7 @@ public abstract class JingleSession extends JingleNegotiator {
sli.sessionClosedOnError(exc, this);
}
}
close();
if (jingleMediaSession != null) {
jingleMediaSession.stopTrasmit();
jingleMediaSession.stopReceive();
@ -1125,7 +1127,6 @@ public abstract class JingleSession extends JingleNegotiator {
jout.setType(IQ.Type.SET);
sendFormattedJingle(jout);
triggerSessionClosed("Closed Locally");
close();
}
/**

View file

@ -1,3 +1,22 @@
/**
* $RCSfile$
* $Revision: $
* $Date: 15/11/2006
*
* Copyright 2003-2006 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.jingle;
import org.jivesoftware.smack.XMPPException;

View file

@ -78,6 +78,7 @@ import java.util.List;
* JingleManager class, that will create the appropiate instance...
*
* @author Alvaro Saurin <alvaro.saurin@gmail.com>
* @author Thiago Camargo
*/
public class OutgoingJingleSession extends JingleSession {

View file

@ -1,7 +1,3 @@
package org.jivesoftware.smackx.jingle.listeners;
import org.jivesoftware.smackx.jingle.JingleSession;
/**
* $RCSfile$
* $Revision: $
@ -22,8 +18,14 @@ import org.jivesoftware.smackx.jingle.JingleSession;
* limitations under the License.
*/
package org.jivesoftware.smackx.jingle.listeners;
import org.jivesoftware.smackx.jingle.JingleSession;
/**
* Inteface used to dispatch a event when a Jingle session is created.
*
* @author Thiago Camargo
*/
public interface CreatedJingleSessionListener {

View file

@ -32,7 +32,7 @@ package org.jivesoftware.smackx.jingle.listeners;
* <i>sessionRequested()</i> of the listener will be executed, and the listener
* will be able to <i>accept()</i> or <i>decline()</i> the invitation.
*
* @author Alvaro Saurin
* @author Thiago Camargo
*/
public interface JingleListener {

View file

@ -21,6 +21,7 @@ package org.jivesoftware.smackx.jingle.listeners;
/**
* Interface for listening to jmf info events.
* @author Thiago Camargo
*/
public interface JingleMediaInfoListener extends JingleListener {
/**

View file

@ -24,6 +24,7 @@ import org.jivesoftware.smackx.jingle.media.PayloadType;
/**
* Interface for listening to jmf events.
* @author Thiago Camargo
*/
public interface JingleMediaListener extends JingleListener {
/**

View file

@ -26,6 +26,7 @@ import org.jivesoftware.smackx.jingle.nat.TransportCandidate;
/**
* Interface for listening for session events.
* @author Thiago Camargo
*/
public interface JingleSessionListener extends JingleListener {
/**

View file

@ -24,6 +24,8 @@ import org.jivesoftware.smackx.jingle.JingleNegotiator;
/**
* Used to Listen for Jingle Session State Changes
*
* @author Thiago Camargo
*/
public interface JingleSessionStateListener {

View file

@ -24,6 +24,8 @@ import org.jivesoftware.smackx.jingle.nat.TransportCandidate;
/**
* Interface for listening to transport events.
*
* @author Thiago Camargo
*/
public interface JingleTransportListener extends JingleListener {

View file

@ -41,7 +41,6 @@ import java.util.List;
* This class is responsible for managing the descriptor negotiation process,
* handling all the xmpp packets interchange and the stage control.
*
* @author Alvaro Saurin
* @author Thiago Camargo
*/
public class MediaNegotiator extends JingleNegotiator {

View file

@ -1,3 +1,22 @@
/**
* $RCSfile$
* $Revision: 7329 $
* $Date: 2007-02-28 20:59:28 -0300 (qua, 28 fev 2007) $
*
* Copyright 2003-2005 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.jingle.media;
/**

View file

@ -1,3 +1,23 @@
/**
* $RCSfile$
* $Revision: 7329 $
* $Date: 2007-02-28 20:59:28 -0300 (qua, 28 fev 2007) $
*
* Copyright 2003-2005 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.jingle.nat;
import org.jivesoftware.smack.XMPPException;

View file

@ -1,3 +1,22 @@
/**
* $RCSfile$
* $Revision: 7329 $
* $Date: 2007-02-28 20:59:28 -0300 (qua, 28 fev 2007) $
*
* Copyright 2003-2005 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.jingle.nat;
import org.jivesoftware.smack.XMPPConnection;

View file

@ -1,12 +1,3 @@
package org.jivesoftware.smackx.jingle.nat;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smackx.jingle.JingleSession;
import org.jivesoftware.smackx.jingle.listeners.CreatedJingleSessionListener;
import org.jivesoftware.smackx.jingle.listeners.JingleSessionListener;
import org.jivesoftware.smackx.jingle.media.PayloadType;
/**
* $RCSfile$
* $Revision: $
@ -26,6 +17,14 @@ import org.jivesoftware.smackx.jingle.media.PayloadType;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.jingle.nat;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smackx.jingle.JingleSession;
import org.jivesoftware.smackx.jingle.listeners.CreatedJingleSessionListener;
import org.jivesoftware.smackx.jingle.listeners.JingleSessionListener;
import org.jivesoftware.smackx.jingle.media.PayloadType;
/**
* A Jingle Transport Manager implementation to be used for NAT Networks.

View file

@ -1,3 +1,22 @@
/**
* $RCSfile$
* $Revision: $
* $Date: 15/11/2006
*
* Copyright 2003-2006 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.jingle.nat;
import java.net.DatagramPacket;

View file

@ -1,3 +1,22 @@
/**
* $RCSfile$
* $Revision: $
* $Date: 15/11/2006
*
* Copyright 2003-2006 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.jingle.nat;
import org.jivesoftware.smack.XMPPException;

View file

@ -1,3 +1,22 @@
/**
* $RCSfile$
* $Revision: $
* $Date: 15/11/2006
*
* Copyright 2003-2006 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.jingle.nat;
import org.jivesoftware.smack.XMPPException;

View file

@ -1,3 +1,22 @@
/**
* $RCSfile$
* $Revision: $
* $Date: 15/11/2006
*
* Copyright 2003-2006 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.jingle.nat;
import org.jivesoftware.smack.PacketCollector;

View file

@ -1,3 +1,22 @@
/**
* $RCSfile$
* $Revision: $
* $Date: 15/11/2006
*
* Copyright 2003-2006 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.jingle.nat;
import de.javawi.jstun.test.BindingLifetimeTest;
@ -21,7 +40,7 @@ import java.util.Enumeration;
*
* The goal of this resolver is to take possible to establish and manage out-of-band connections between two XMPP entities, even if they are behind Network Address Translators (NATs) or firewalls.
*
* @author Alvaro Saurin
* @author Thiago Camargo
*/
public class STUNResolver extends TransportResolver {

View file

@ -1,7 +1,3 @@
package org.jivesoftware.smackx.jingle.nat;
import org.jivesoftware.smack.XMPPException;
/**
* $RCSfile$
* $Revision: $
@ -21,6 +17,9 @@ import org.jivesoftware.smack.XMPPException;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.jingle.nat;
import org.jivesoftware.smack.XMPPException;
/**
* A Jingle Transport Manager implementation to be used on NAT networks with STUN Service NOT Blocked.

View file

@ -1,3 +1,23 @@
/**
* $RCSfile$
* $Revision: $
* $Date: 15/11/2006
*
* Copyright 2003-2006 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.jingle.nat;
import org.jivesoftware.smack.XMPPException;

View file

@ -1,3 +1,22 @@
/**
* $RCSfile$
* $Revision: $
* $Date: 15/11/2006
*
* Copyright 2003-2006 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.jingle.nat;
/**

View file

@ -1,3 +1,22 @@
/**
* $RCSfile$
* $Revision: 7329 $
* $Date: 2007-02-28 20:59:28 -0300 (qua, 28 fev 2007) $
*
* Copyright 2003-2005 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.packet;
import org.jivesoftware.smack.packet.PacketExtension;

View file

@ -1,3 +1,22 @@
/**
* $RCSfile$
* $Revision: 7329 $
* $Date: 2007-02-28 20:59:28 -0300 (qua, 28 fev 2007) $
*
* Copyright 2003-2005 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.packet;
import org.jivesoftware.smack.packet.PacketExtension;

View file

@ -21,6 +21,9 @@
package org.jivesoftware.smackx.packet;
import org.jivesoftware.smack.packet.PacketExtension;
import org.jivesoftware.smack.provider.PacketExtensionProvider;
import org.jivesoftware.smackx.jingle.media.ContentInfo;
import org.xmlpull.v1.XmlPullParser;
public class JingleError implements PacketExtension {
@ -119,4 +122,36 @@ public class JingleError implements PacketExtension {
public String getNamespace() {
return NAMESPACE;
}
public static class Provider implements PacketExtensionProvider {
private PacketExtension audioInfo;
/**
* Empty constructor.
*/
public Provider() {
}
/**
* Parse a JingleContentDescription.Audio extension.
*/
public PacketExtension parseExtension(final XmlPullParser parser)
throws Exception {
PacketExtension result = null;
if (audioInfo != null) {
result = audioInfo;
} else {
String elementName = parser.getName();
// Try to get an Audio content info
ContentInfo mi = ContentInfo.Audio.fromString(elementName);
if (mi != null) {
result = new JingleContentInfo.Audio(mi);
}
}
return result;
}
}
}

View file

@ -1,3 +1,22 @@
/**
* $RCSfile$
* $Revision: 7329 $
* $Date: 2007-02-28 20:59:28 -0300 (qua, 28 fev 2007) $
*
* Copyright 2003-2005 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.packet;
import org.jivesoftware.smack.packet.PacketExtension;

View file

@ -1,3 +1,22 @@
/**
* $RCSfile$
* $Revision: 7329 $
* $Date: 2007-02-28 20:59:28 -0300 (qua, 28 fev 2007) $
*
* Copyright 2003-2005 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.provider;
import org.jivesoftware.smack.packet.PacketExtension;

View file

@ -1,3 +1,22 @@
/**
* $RCSfile$
* $Revision: 7329 $
* $Date: 2007-02-28 20:59:28 -0300 (qua, 28 fev 2007) $
*
* Copyright 2003-2005 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.provider;
import org.jivesoftware.smack.packet.PacketExtension;

View file

@ -1,3 +1,22 @@
/**
* $RCSfile$
* $Revision: 7329 $
* $Date: 2007-02-28 20:59:28 -0300 (qua, 28 fev 2007) $
*
* Copyright 2003-2005 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.provider;
import org.jivesoftware.smack.packet.PacketExtension;

View file

@ -81,6 +81,7 @@ import java.util.List;
* </p>
*
* @author Alvaro Saurin
* @author Thiago Camargo
*/
public class JingleManagerTest extends SmackTestCase {

View file

@ -18,7 +18,7 @@ import java.util.ArrayList;
/**
* Test the STUN IP resolver.
*
* @author alvaro
* @author Thiago Camargo
*/
public class STUNResolverTest extends SmackTestCase {

View file

@ -129,11 +129,10 @@ public class JingleMediaTest extends SmackTestCase {
x1, new BasicTransportManager());
MultiMediaManager jingleMediaManager0 = new MultiMediaManager();
jingleMediaManager0.addMediaManager(new SpeexMediaManager());
jingleMediaManager0.addMediaManager(new JmfMediaManager());
// jingleMediaManager0.addMediaManager(new SpeexMediaManager());
jingleMediaManager0.addMediaManager(new JmfMediaManager());
MultiMediaManager jingleMediaManager1 = new MultiMediaManager();
jingleMediaManager1.addMediaManager(new JmfMediaManager());
// jingleMediaManager1.addMediaManager(new JmfMediaManager());
jingleMediaManager1.addMediaManager(new SpeexMediaManager());
jm0.setMediaManager(jingleMediaManager0);