mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 00:59:39 +02:00
Enable trailing whitespace checkstyle check
for all source code regions, including javadoc.
This commit is contained in:
parent
9d61a6de7d
commit
e8923b9d16
545 changed files with 3713 additions and 3715 deletions
|
@ -53,7 +53,7 @@ public class PayloadTypeTest extends SmackTestCase {
|
|||
set2.add(common1);
|
||||
|
||||
// Get the difference
|
||||
ArrayList<Audio> commonSet = new ArrayList<Audio>();
|
||||
ArrayList<Audio> commonSet = new ArrayList<Audio>();
|
||||
commonSet.addAll(set1);
|
||||
commonSet.retainAll(set2);
|
||||
|
||||
|
@ -88,7 +88,7 @@ public class PayloadTypeTest extends SmackTestCase {
|
|||
set2.add(common4);
|
||||
|
||||
// Get the difference
|
||||
ArrayList<Audio> commonSet = new ArrayList<Audio>();
|
||||
ArrayList<Audio> commonSet = new ArrayList<Audio>();
|
||||
commonSet.addAll(set1);
|
||||
commonSet.retainAll(set2);
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ public class BasicResolverTest extends SmackTestCase {
|
|||
public void candidateChecked(TransportCandidate cand, boolean result) {
|
||||
if(result == true) {
|
||||
System.out.println(cand.getIp() + " is reachable (as expected)");
|
||||
incCounter();
|
||||
incCounter();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class BasicResolverTest extends SmackTestCase {
|
|||
public void candidateChecked(TransportCandidate cand, boolean result) {
|
||||
if(result == false) {
|
||||
System.out.println(cand.getIp() + " is _not_ reachable (as expected)");
|
||||
incCounter();
|
||||
incCounter();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ public class JingleProviderTest extends SmackTestCase {
|
|||
|
||||
System.out.println("Sent: " + iqSent.toXML());
|
||||
System.out.println("Received: " + jin.toXML());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -111,7 +111,7 @@ public class ContentNegotiator extends JingleNegotiator {
|
|||
|
||||
/**
|
||||
* Get the JingleMediaSession of this Jingle Session.
|
||||
*
|
||||
*
|
||||
* @return the JingleMediaSession
|
||||
*/
|
||||
public JingleMediaSession getJingleMediaSession() {
|
||||
|
@ -165,7 +165,7 @@ public class ContentNegotiator extends JingleNegotiator {
|
|||
|
||||
/**
|
||||
* Obtain the description negotiator for this session.
|
||||
*
|
||||
*
|
||||
* @return the description negotiator
|
||||
*/
|
||||
public MediaNegotiator getMediaNegotiator() {
|
||||
|
@ -174,7 +174,7 @@ public class ContentNegotiator extends JingleNegotiator {
|
|||
|
||||
/**
|
||||
* Set the jmf negotiator.
|
||||
*
|
||||
*
|
||||
* @param mediaNeg
|
||||
* the description negotiator to set
|
||||
*/
|
||||
|
@ -195,7 +195,7 @@ public class ContentNegotiator extends JingleNegotiator {
|
|||
|
||||
/**
|
||||
* Obtain the transport negotiator for this session.
|
||||
*
|
||||
*
|
||||
* @return the transport negotiator instance
|
||||
*/
|
||||
public TransportNegotiator getTransportNegotiator() {
|
||||
|
@ -204,7 +204,7 @@ public class ContentNegotiator extends JingleNegotiator {
|
|||
|
||||
/**
|
||||
* Set TransportNegotiator
|
||||
*
|
||||
*
|
||||
* @param transNeg
|
||||
* the transNeg to set
|
||||
*/
|
||||
|
@ -247,7 +247,7 @@ public class ContentNegotiator extends JingleNegotiator {
|
|||
|
||||
// PayloadType.Audio bestCommonAudioPt = getMediaNegotiator().getBestCommonAudioPt();
|
||||
// TransportCandidate bestRemoteCandidate = getTransportNegotiator().getBestRemoteCandidate();
|
||||
//
|
||||
//
|
||||
// // Ok, send a packet saying that we accept this session
|
||||
// // with the audio payload type and the transport
|
||||
// // candidate
|
||||
|
@ -275,8 +275,8 @@ public class ContentNegotiator extends JingleNegotiator {
|
|||
|
||||
/**
|
||||
* Trigger a session established event.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
private void triggerContentEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc) throws NotConnectedException, InterruptedException {
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@ package org.jivesoftware.smackx.jingleold;
|
|||
|
||||
/**
|
||||
* The "action" in the jingle packet, as an enum.
|
||||
*
|
||||
*
|
||||
* Changed to reflect XEP-166 rev: 20JUN07
|
||||
*
|
||||
*
|
||||
* @author Jeff Williams
|
||||
*/
|
||||
public enum JingleActionEnum {
|
||||
|
|
|
@ -194,8 +194,8 @@ public class JingleManager implements JingleSessionListener {
|
|||
*
|
||||
* @param connection XMPP XMPPConnection to be used
|
||||
* @param jingleMediaManagers an implemented JingleMediaManager to be used.
|
||||
* @throws SmackException
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws XMPPException
|
||||
*/
|
||||
public JingleManager(XMPPConnection connection, List<JingleMediaManager> jingleMediaManagers) throws XMPPException, SmackException {
|
||||
this.connection = connection;
|
||||
|
@ -303,8 +303,8 @@ public class JingleManager implements JingleSessionListener {
|
|||
* @return a boolean indicating whether the specified user handles Jingle
|
||||
* messages
|
||||
* @throws SmackException if there was no response from the server.
|
||||
* @throws XMPPException
|
||||
* @throws InterruptedException
|
||||
* @throws XMPPException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public static boolean isServiceEnabled(XMPPConnection connection, Jid userID) throws XMPPException, SmackException, InterruptedException {
|
||||
return ServiceDiscoveryManager.getInstanceFor(connection).supportsFeature(userID, Jingle.NAMESPACE);
|
||||
|
|
|
@ -201,9 +201,9 @@ public abstract class JingleNegotiator {
|
|||
|
||||
/**
|
||||
* Dispatch an incoming packet.
|
||||
*
|
||||
*
|
||||
* The negotiators form a tree relationship that roughly matches the Jingle stanza format:
|
||||
*
|
||||
*
|
||||
* JingleSession
|
||||
* Content Negotiator
|
||||
* Media Negotiator
|
||||
|
@ -211,7 +211,7 @@ public abstract class JingleNegotiator {
|
|||
* Content Negotiator
|
||||
* Media Negotiator
|
||||
* Transport Negotiator
|
||||
*
|
||||
*
|
||||
* <jingle>
|
||||
* <content>
|
||||
* <description>
|
||||
|
@ -219,10 +219,10 @@ public abstract class JingleNegotiator {
|
|||
* <content>
|
||||
* <description>
|
||||
* <transport>
|
||||
*
|
||||
*
|
||||
* This way, each segment of a Jingle stanza has a corresponding negotiator that know how to deal with that
|
||||
* part of the Jingle packet. It also allows us to support Jingle packets of arbitraty complexity.
|
||||
*
|
||||
*
|
||||
* Each parent calls dispatchIncomingPacket for each of its children. The children then pass back a List of
|
||||
* results that will get sent when we reach the top level negotiator (JingleSession).
|
||||
*
|
||||
|
@ -230,7 +230,7 @@ public abstract class JingleNegotiator {
|
|||
* @param id the ID of the response that will be sent
|
||||
* @return the new stanza to send (either a Jingle or an IQ error).
|
||||
* @throws XMPPException
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public abstract List<IQ> dispatchIncomingPacket(IQ iq, String id) throws XMPPException, SmackException, InterruptedException;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
package org.jivesoftware.smackx.jingleold;
|
||||
|
||||
/**
|
||||
* Jingle negotiator state.
|
||||
* Jingle negotiator state.
|
||||
* @author Jeff Williams
|
||||
*/
|
||||
public enum JingleNegotiatorState {
|
||||
|
|
|
@ -58,7 +58,7 @@ import org.jxmpp.jid.Jid;
|
|||
* An abstract Jingle session. This class contains some basic properties of
|
||||
* every Jingle session. However, the concrete implementation can be found in
|
||||
* subclasses.
|
||||
*
|
||||
*
|
||||
* @author Alvaro Saurin
|
||||
* @author Jeff Williams
|
||||
*/
|
||||
|
@ -99,7 +99,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Full featured JingleSession constructor.
|
||||
*
|
||||
*
|
||||
* @param conn
|
||||
* the XMPPConnection which is used
|
||||
* @param initiator
|
||||
|
@ -135,7 +135,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* JingleSession constructor (for an outgoing Jingle session).
|
||||
*
|
||||
*
|
||||
* @param conn
|
||||
* Connection
|
||||
* @param initiator
|
||||
|
@ -153,7 +153,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Get the session initiator.
|
||||
*
|
||||
*
|
||||
* @return the initiator
|
||||
*/
|
||||
public Jid getInitiator() {
|
||||
|
@ -167,7 +167,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Set the session initiator.
|
||||
*
|
||||
*
|
||||
* @param initiator
|
||||
* the initiator to set
|
||||
*/
|
||||
|
@ -177,7 +177,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Get the Media Manager of this Jingle Session.
|
||||
*
|
||||
*
|
||||
* @return the JingleMediaManagers
|
||||
*/
|
||||
public List<JingleMediaManager> getMediaManagers() {
|
||||
|
@ -186,7 +186,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Set the Media Manager of this Jingle Session.
|
||||
*
|
||||
*
|
||||
* @param jingleMediaManagers
|
||||
*/
|
||||
public void setMediaManagers(List<JingleMediaManager> jingleMediaManagers) {
|
||||
|
@ -195,7 +195,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Get the session responder.
|
||||
*
|
||||
*
|
||||
* @return the responder
|
||||
*/
|
||||
public Jid getResponder() {
|
||||
|
@ -204,7 +204,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Set the session responder.
|
||||
*
|
||||
*
|
||||
* @param responder
|
||||
* the receptor to set
|
||||
*/
|
||||
|
@ -214,7 +214,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Get the session ID.
|
||||
*
|
||||
*
|
||||
* @return the sid
|
||||
*/
|
||||
public String getSid() {
|
||||
|
@ -223,7 +223,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Set the session ID
|
||||
*
|
||||
*
|
||||
* @param sessionId
|
||||
* the sid to set
|
||||
*/
|
||||
|
@ -276,12 +276,12 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
* the current state, delivering it to the right event handler and wait for
|
||||
* a response. The response will be another Jingle stanza that will be sent
|
||||
* to the other end point.
|
||||
*
|
||||
*
|
||||
* @param iq
|
||||
* the stanza received
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public synchronized void receivePacketAndRespond(IQ iq) throws XMPPException, SmackException, InterruptedException {
|
||||
List<IQ> responses = new ArrayList<>();
|
||||
|
@ -345,13 +345,13 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
* Dispatch an incoming packet. The method is responsible for recognizing
|
||||
* the stanza type and, depending on the current state, delivering the
|
||||
* stanza to the right event handler and wait for a response.
|
||||
*
|
||||
*
|
||||
* @param iq
|
||||
* the stanza received
|
||||
* @return the new Jingle stanza to send.
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Override
|
||||
public List<IQ> dispatchIncomingPacket(IQ iq, String id) throws XMPPException, SmackException, InterruptedException {
|
||||
|
@ -421,11 +421,11 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
/**
|
||||
* Complete and send a packet. Complete all the null fields in a Jingle
|
||||
* reponse, using the session information we have.
|
||||
*
|
||||
*
|
||||
* @param jout
|
||||
* the Jingle stanza we want to complete and send
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public Jingle sendFormattedJingle(Jingle jout) throws NotConnectedException, InterruptedException {
|
||||
return sendFormattedJingle(null, jout);
|
||||
|
@ -435,13 +435,13 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
* Complete and send a packet. Complete all the null fields in a Jingle
|
||||
* reponse, using the session information we have or some info from the
|
||||
* incoming packet.
|
||||
*
|
||||
*
|
||||
* @param iq
|
||||
* The Jingle stanza we are responding to
|
||||
* @param jout
|
||||
* the Jingle stanza we want to complete and send
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public Jingle sendFormattedJingle(IQ iq, Jingle jout) throws NotConnectedException, InterruptedException {
|
||||
if (jout != null) {
|
||||
|
@ -507,7 +507,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Acknowledge a IQ packet.
|
||||
*
|
||||
*
|
||||
* @param iq
|
||||
* The IQ to acknowledge
|
||||
*/
|
||||
|
@ -535,7 +535,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
// }
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
|
@ -545,7 +545,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
|
@ -594,7 +594,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Clean a session from the list.
|
||||
*
|
||||
*
|
||||
* @param connection
|
||||
* The connection to clean up
|
||||
*/
|
||||
|
@ -615,7 +615,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Returns the JingleSession related to a particular connection.
|
||||
*
|
||||
*
|
||||
* @param con
|
||||
* A XMPP connection
|
||||
* @return a Jingle session
|
||||
|
@ -637,7 +637,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Configure a session, setting some action listeners...
|
||||
*
|
||||
*
|
||||
* @param connection
|
||||
* The connection to set up
|
||||
*/
|
||||
|
@ -749,7 +749,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Add a listener for jmf negotiation events.
|
||||
*
|
||||
*
|
||||
* @param li
|
||||
* The listener
|
||||
*/
|
||||
|
@ -764,7 +764,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Remove a listener for jmf negotiation events.
|
||||
*
|
||||
*
|
||||
* @param li
|
||||
* The listener
|
||||
*/
|
||||
|
@ -778,7 +778,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Add a listener for transport negotiation events.
|
||||
*
|
||||
*
|
||||
* @param li
|
||||
* The listener
|
||||
*/
|
||||
|
@ -792,7 +792,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Remove a listener for transport negotiation events.
|
||||
*
|
||||
*
|
||||
* @param li
|
||||
* The listener
|
||||
*/
|
||||
|
@ -979,10 +979,10 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
// }
|
||||
/**
|
||||
* Terminates the session with default reason.
|
||||
*
|
||||
*
|
||||
* @throws XMPPException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public void terminate() throws XMPPException, NotConnectedException, InterruptedException {
|
||||
terminate("Closed Locally");
|
||||
|
@ -990,10 +990,10 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Terminates the session with a custom reason.
|
||||
*
|
||||
*
|
||||
* @throws XMPPException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public void terminate(String reason) throws XMPPException, NotConnectedException, InterruptedException {
|
||||
if (isClosed())
|
||||
|
@ -1043,7 +1043,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
* Complete and send an error. Complete all the null fields in an IQ error
|
||||
* response, using the session information we have or some info from the
|
||||
* incoming packet.
|
||||
*
|
||||
*
|
||||
* @param iq
|
||||
* The Jingle stanza we are responding to
|
||||
* @param jingleError
|
||||
|
@ -1077,10 +1077,10 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* This is the starting point for intitiating a new session.
|
||||
*
|
||||
*
|
||||
* @throws IllegalStateException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public void startOutgoing() throws IllegalStateException, SmackException, InterruptedException {
|
||||
|
||||
|
@ -1127,7 +1127,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
// Now setup to track the media negotiators, so that we know when (if) to send a session-accept.
|
||||
setupListeners();
|
||||
|
||||
// Give each of the content negotiators a chance to start
|
||||
// Give each of the content negotiators a chance to start
|
||||
// and return a portion of the structure to make the Jingle packet.
|
||||
|
||||
// Don't do this anymore. The problem is that the other side might not be ready.
|
||||
|
@ -1154,7 +1154,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
/**
|
||||
* When we initiate a session we need to start a bunch of negotiators right after we receive the result
|
||||
* stanza for our session-initiate. This is where we start them.
|
||||
*
|
||||
*
|
||||
*/
|
||||
private void startNegotiators() {
|
||||
|
||||
|
|
|
@ -109,8 +109,8 @@ public class JingleSessionRequest {
|
|||
*
|
||||
* @return Returns the IncomingJingleSession on which the
|
||||
* negotiation can be carried out.
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public synchronized JingleSession accept() throws XMPPException, SmackException, InterruptedException {
|
||||
JingleSession session;
|
||||
|
|
|
@ -25,11 +25,11 @@ import org.jivesoftware.smackx.jingleold.packet.Jingle;
|
|||
* Implement the Jingle Session state using the State Behavioral pattern.
|
||||
* (From the book Design Patterns, AKA GoF.)
|
||||
* These classes also employ the Flyweight and Singleton patterns as recommended for the State pattern by GoF.
|
||||
*
|
||||
*
|
||||
* There seems to be three ways to go with the State pattern in Java: interface, abstract class and enums.
|
||||
* Most of the accepted models use abstract classes. It wasn't clear to me that any of the three models was
|
||||
* superior, so I went with the most common example.
|
||||
*
|
||||
*
|
||||
* @author Jeff Williams
|
||||
*/
|
||||
public abstract class JingleSessionState {
|
||||
|
@ -55,7 +55,7 @@ public abstract class JingleSessionState {
|
|||
/**
|
||||
* Process an incoming Jingle Packet.
|
||||
* When you look at the GoF State pattern this method roughly corresponds to example on p310: ProcessOctect().
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public abstract IQ processJingle(JingleSession session, Jingle jingle, JingleActionEnum action) throws SmackException, InterruptedException;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.jivesoftware.smackx.jingleold.packet.Jingle;
|
|||
import org.jivesoftware.smackx.jingleold.packet.JingleError;
|
||||
|
||||
/**
|
||||
* Jingle.
|
||||
* Jingle.
|
||||
* @author Jeff Williams
|
||||
* @see JingleSessionState
|
||||
*/
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.jivesoftware.smackx.jingleold.packet.Jingle;
|
|||
import org.jivesoftware.smackx.jingleold.packet.JingleError;
|
||||
|
||||
/**
|
||||
* Jingle.
|
||||
* Jingle.
|
||||
* @author Jeff Williams
|
||||
* @see JingleSessionState
|
||||
*/
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.jivesoftware.smack.packet.IQ;
|
|||
import org.jivesoftware.smackx.jingleold.packet.Jingle;
|
||||
|
||||
/**
|
||||
* Jingle.
|
||||
* Jingle.
|
||||
* @author Jeff Williams
|
||||
* @see JingleSessionState
|
||||
*/
|
||||
|
|
|
@ -36,7 +36,7 @@ import org.jivesoftware.smackx.jingleold.packet.JingleError;
|
|||
import org.jivesoftware.smackx.jingleold.packet.JingleTransport;
|
||||
|
||||
/**
|
||||
* Jingle.
|
||||
* Jingle.
|
||||
* @author Jeff Williams
|
||||
* @see JingleSessionState
|
||||
*/
|
||||
|
@ -97,8 +97,8 @@ public class JingleSessionStateUnknown extends JingleSessionState {
|
|||
/**
|
||||
* In the UNKNOWN state we received a <session-initiate> action.
|
||||
* This method processes that action.
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
|
||||
private IQ receiveSessionInitiateAction(JingleSession session, Jingle inJingle) throws SmackException, InterruptedException {
|
||||
|
@ -149,7 +149,7 @@ public class JingleSessionStateUnknown extends JingleSessionState {
|
|||
// Get the media negotiator that goes with the <description> of this content.
|
||||
JingleDescription jingleDescription = jingleContent.getDescription();
|
||||
|
||||
// Loop through each media manager looking for the ones that matches the incoming
|
||||
// Loop through each media manager looking for the ones that matches the incoming
|
||||
// session-initiate <content> choices.
|
||||
// (Set the first media manager as the default, so that in case things don't match we can still negotiate.)
|
||||
JingleMediaManager chosenMediaManager = session.getMediaManagers().get(0);
|
||||
|
|
|
@ -20,7 +20,7 @@ import org.jivesoftware.smackx.jingleold.JingleSession;
|
|||
|
||||
/**
|
||||
* Inteface used to dispatch a event when a Jingle session is created.
|
||||
*
|
||||
*
|
||||
* @author Thiago Camargo
|
||||
*/
|
||||
public interface CreatedJingleSessionListener {
|
||||
|
|
|
@ -28,7 +28,7 @@ package org.jivesoftware.smackx.jingleold.listeners;
|
|||
* listener when a new session request is received. In this case, the
|
||||
* <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 Thiago Camargo
|
||||
*/
|
||||
public interface JingleListener {
|
||||
|
|
|
@ -30,8 +30,8 @@ public interface JingleMediaListener extends JingleListener {
|
|||
* Notification that the jmf has been negotiated and established.
|
||||
*
|
||||
* @param pt The payload type agreed.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
void mediaEstablished(PayloadType pt) throws NotConnectedException, InterruptedException;
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ public interface JingleSessionListener extends JingleListener {
|
|||
* service.
|
||||
* @param localCandidate the local candidate where we must listen for connections
|
||||
* @param jingleSession Session that called the method
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
void sessionEstablished(PayloadType pt, TransportCandidate remoteCandidate,
|
||||
TransportCandidate localCandidate, JingleSession jingleSession) throws NotConnectedException, InterruptedException;
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.jivesoftware.smackx.jingleold.nat.TransportCandidate;
|
|||
|
||||
/**
|
||||
* Interface for listening to transport events.
|
||||
*
|
||||
*
|
||||
* @author Thiago Camargo
|
||||
*/
|
||||
public interface JingleTransportListener extends JingleListener {
|
||||
|
@ -35,8 +35,8 @@ public interface JingleTransportListener extends JingleListener {
|
|||
* in the local machine
|
||||
* @param remote The transport candidate that has been used for
|
||||
* transmitting to the remote machine
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
void transportEstablished(TransportCandidate local,
|
||||
TransportCandidate remote) throws NotConnectedException, InterruptedException;
|
||||
|
|
|
@ -78,7 +78,7 @@ public abstract class JingleMediaManager {
|
|||
public abstract JingleMediaSession createMediaSession(PayloadType payloadType, TransportCandidate remote,
|
||||
TransportCandidate local, JingleSession jingleSession);
|
||||
|
||||
// This is to set the attributes of the <content> element of the Jingle packet.
|
||||
// This is to set the attributes of the <content> element of the Jingle packet.
|
||||
public String getName() {
|
||||
return MEDIA_NAME;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ import org.jivesoftware.smackx.jingleold.packet.JingleError;
|
|||
* for managing the descriptor negotiation process, handling all the xmpp
|
||||
* packets interchange and the stage control. handling all the xmpp packets
|
||||
* interchange and the stage control.
|
||||
*
|
||||
*
|
||||
* @author Thiago Camargo
|
||||
*/
|
||||
public class MediaNegotiator extends JingleNegotiator {
|
||||
|
@ -67,7 +67,7 @@ public class MediaNegotiator extends JingleNegotiator {
|
|||
* Default constructor. The constructor establishes some basic parameters,
|
||||
* but it does not start the negotiation. For starting the negotiation, call
|
||||
* startNegotiation.
|
||||
*
|
||||
*
|
||||
* @param session
|
||||
* The jingle session.
|
||||
*/
|
||||
|
@ -98,13 +98,13 @@ public class MediaNegotiator extends JingleNegotiator {
|
|||
* Dispatch an incoming packet. The method is responsible for recognizing
|
||||
* the stanza type and, depending on the current state, delivering the
|
||||
* stanza to the right event handler and wait for a response.
|
||||
*
|
||||
*
|
||||
* @param iq
|
||||
* the stanza received
|
||||
* @return the new Jingle stanza to send.
|
||||
* @throws XMPPException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Override
|
||||
public List<IQ> dispatchIncomingPacket(IQ iq, String id) throws XMPPException, NotConnectedException, InterruptedException {
|
||||
|
@ -198,14 +198,14 @@ public class MediaNegotiator extends JingleNegotiator {
|
|||
/**
|
||||
* The other side has sent us a content-accept. The payload types in that message may not match with what
|
||||
* we sent, but XEP-167 says that the other side should retain the order of the payload types we first sent.
|
||||
*
|
||||
*
|
||||
* This means we can walk through our list, in order, until we find one from their list that matches. This
|
||||
* will be the best payload type to use.
|
||||
*
|
||||
*
|
||||
* @param jingle
|
||||
* @return the iq
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
private IQ receiveContentAcceptAction(Jingle jingle, JingleDescription description) throws XMPPException, NotConnectedException, InterruptedException {
|
||||
IQ response;
|
||||
|
@ -262,7 +262,7 @@ public class MediaNegotiator extends JingleNegotiator {
|
|||
/**
|
||||
* A content info has been received. This is done for publishing the
|
||||
* list of payload types...
|
||||
*
|
||||
*
|
||||
* @param jingle
|
||||
* The input packet
|
||||
* @return a Jingle packet
|
||||
|
@ -302,7 +302,7 @@ public class MediaNegotiator extends JingleNegotiator {
|
|||
/**
|
||||
* A jmf description has been accepted. In this case, we must save the
|
||||
* accepted payload type and notify any listener...
|
||||
*
|
||||
*
|
||||
* @param jin
|
||||
* The input packet
|
||||
* @return a Jingle packet
|
||||
|
@ -340,7 +340,7 @@ public class MediaNegotiator extends JingleNegotiator {
|
|||
|
||||
/**
|
||||
* Return true if the content is negotiated.
|
||||
*
|
||||
*
|
||||
* @return true if the content is negotiated.
|
||||
*/
|
||||
public boolean isEstablished() {
|
||||
|
@ -349,7 +349,7 @@ public class MediaNegotiator extends JingleNegotiator {
|
|||
|
||||
/**
|
||||
* Return true if the content is fully negotiated.
|
||||
*
|
||||
*
|
||||
* @return true if the content is fully negotiated.
|
||||
*/
|
||||
public boolean isFullyEstablished() {
|
||||
|
@ -407,7 +407,7 @@ public class MediaNegotiator extends JingleNegotiator {
|
|||
|
||||
/**
|
||||
* Adds a payload type to the list of remote payloads.
|
||||
*
|
||||
*
|
||||
* @param pt
|
||||
* the remote payload type
|
||||
*/
|
||||
|
@ -421,7 +421,7 @@ public class MediaNegotiator extends JingleNegotiator {
|
|||
|
||||
// /**
|
||||
// * Create an offer for the list of audio payload types.
|
||||
// *
|
||||
// *
|
||||
// * @return a new Jingle packet with the list of audio Payload Types
|
||||
// */
|
||||
// private Jingle createAudioPayloadTypesOffer() {
|
||||
|
@ -462,7 +462,7 @@ public class MediaNegotiator extends JingleNegotiator {
|
|||
|
||||
/**
|
||||
* Get the best common codec between both parts.
|
||||
*
|
||||
*
|
||||
* @return The best common PayloadType codec.
|
||||
*/
|
||||
public PayloadType getBestCommonAudioPt() {
|
||||
|
@ -473,11 +473,11 @@ public class MediaNegotiator extends JingleNegotiator {
|
|||
|
||||
/**
|
||||
* Trigger a session established event.
|
||||
*
|
||||
*
|
||||
* @param bestPt
|
||||
* payload type that has been agreed.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
protected void triggerMediaEstablished(PayloadType bestPt) throws NotConnectedException, InterruptedException {
|
||||
List<JingleListener> listeners = getListenersList();
|
||||
|
@ -491,7 +491,7 @@ public class MediaNegotiator extends JingleNegotiator {
|
|||
|
||||
/**
|
||||
* Trigger a jmf closed event.
|
||||
*
|
||||
*
|
||||
* @param currPt
|
||||
* current payload type that is cancelled.
|
||||
*/
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.util.logging.Logger;
|
|||
|
||||
/**
|
||||
* An image Quantizer based on the Octree algorithm. This is a very basic implementation
|
||||
* at present and could be much improved by picking the nodes to reduce more carefully
|
||||
* at present and could be much improved by picking the nodes to reduce more carefully
|
||||
* (i.e. not completely at random) when I get the time.
|
||||
*/
|
||||
public class OctTreeQuantizer implements Quantizer {
|
||||
|
|
|
@ -18,7 +18,7 @@ package org.jivesoftware.smackx.jingleold.mediaimpl.sshare.api;
|
|||
|
||||
/**
|
||||
* The interface for an image quantizer. The addColor method is called (repeatedly
|
||||
* if necessary) with all the image pixels. A color table can then be returned by
|
||||
* if necessary) with all the image pixels. A color table can then be returned by
|
||||
* calling the buildColorTable method.
|
||||
*/
|
||||
public interface Quantizer {
|
||||
|
@ -45,7 +45,7 @@ public interface Quantizer {
|
|||
/**
|
||||
* Using the previously-built color table, return the index into that table for a pixel.
|
||||
* This is guaranteed to return a valid index - returning the index of a color closer
|
||||
* to that requested if necessary.
|
||||
* to that requested if necessary.
|
||||
* @param rgb the pixel to find
|
||||
* @return the pixel's index in the color table
|
||||
*/
|
||||
|
|
|
@ -48,8 +48,8 @@ public class BasicResolver extends TransportResolver {
|
|||
*
|
||||
* The BasicResolver takes the IP addresses of the interfaces and uses the
|
||||
* first non-loopback, non-linklocal and non-sitelocal address.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Override
|
||||
public synchronized void resolve(JingleSession session) throws XMPPException, NotConnectedException, InterruptedException {
|
||||
|
|
|
@ -20,7 +20,7 @@ import org.jivesoftware.smackx.jingleold.JingleSession;
|
|||
|
||||
/**
|
||||
* A Basic Jingle Transport Manager implementation.
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class BasicTransportManager extends JingleTransportManager{
|
||||
|
||||
|
|
|
@ -63,8 +63,8 @@ public class BridgedResolver extends TransportResolver {
|
|||
* Resolve Bridged Candidate.
|
||||
*
|
||||
* The BridgedResolver takes the IP address and ports of a jmf proxy service.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Override
|
||||
public synchronized void resolve(JingleSession session) throws XMPPException, NotConnectedException, InterruptedException {
|
||||
|
|
|
@ -52,8 +52,8 @@ public class FixedResolver extends TransportResolver {
|
|||
|
||||
/**
|
||||
* Resolve the IP address.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Override
|
||||
public synchronized void resolve(JingleSession session) throws XMPPException, NotConnectedException, InterruptedException {
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.jivesoftware.smackx.jingleold.media.PayloadType;
|
|||
|
||||
/**
|
||||
* A Fixed Jingle Transport Manager implementation.
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class FixedTransportManager extends JingleTransportManager implements JingleSessionListener, CreatedJingleSessionListener {
|
||||
|
||||
|
|
|
@ -96,8 +96,8 @@ public class ICEResolver extends TransportResolver {
|
|||
|
||||
/**
|
||||
* Resolve the IP and obtain a valid transport method.
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Override
|
||||
public synchronized void resolve(JingleSession session) throws XMPPException, SmackException, InterruptedException {
|
||||
|
|
|
@ -52,7 +52,7 @@ public abstract class JingleTransportManager {
|
|||
* Get a new Transport Resolver to be used in a Jingle Session.
|
||||
*
|
||||
* @return the TransportResolver to be used
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public TransportResolver getResolver(JingleSession session) throws XMPPException, SmackException, InterruptedException {
|
||||
TransportResolver resolver = createResolver(session);
|
||||
|
@ -68,7 +68,7 @@ public abstract class JingleTransportManager {
|
|||
* Create a Transport Resolver instance according to the implementation.
|
||||
*
|
||||
* @return the TransportResolver
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
protected abstract TransportResolver createResolver(JingleSession session) throws SmackException, InterruptedException;
|
||||
|
||||
|
|
|
@ -392,8 +392,8 @@ public class RTPBridge extends IQ {
|
|||
* @param connection
|
||||
* @param sessionID
|
||||
* @return the new RTPBridge
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static RTPBridge getRTPBridge(XMPPConnection connection, String sessionID) throws NotConnectedException, InterruptedException {
|
||||
|
@ -420,10 +420,10 @@ public class RTPBridge extends IQ {
|
|||
*
|
||||
* @param connection
|
||||
* @return true if the server supports the RTPBridge service
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public static boolean serviceAvailable(XMPPConnection connection) throws NoResponseException,
|
||||
XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
|
@ -460,8 +460,8 @@ public class RTPBridge extends IQ {
|
|||
*
|
||||
* @param connection
|
||||
* @return the RTPBridge
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static RTPBridge relaySession(XMPPConnection connection, String sessionID, String pass, TransportCandidate proxyCandidate, TransportCandidate localCandidate) throws NotConnectedException, InterruptedException {
|
||||
|
@ -497,8 +497,8 @@ public class RTPBridge extends IQ {
|
|||
*
|
||||
* @param xmppConnection
|
||||
* @return public IP String or null if not found
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static String getPublicIP(XMPPConnection xmppConnection) throws NotConnectedException, InterruptedException {
|
||||
|
|
|
@ -174,8 +174,8 @@ public class STUN extends SimpleIQ {
|
|||
*
|
||||
* @param connection
|
||||
* @return the STUN server address
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static STUN getSTUNServer(XMPPConnection connection) throws NotConnectedException, InterruptedException {
|
||||
|
@ -202,9 +202,9 @@ public class STUN extends SimpleIQ {
|
|||
*
|
||||
* @param connection the connection
|
||||
* @return true if the server support STUN
|
||||
* @throws SmackException
|
||||
* @throws XMPPException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackException
|
||||
* @throws XMPPException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public static boolean serviceAvailable(XMPPConnection connection) throws XMPPException, SmackException, InterruptedException {
|
||||
|
||||
|
|
|
@ -265,8 +265,8 @@ public class STUNResolver extends TransportResolver {
|
|||
|
||||
/**
|
||||
* Resolve the IP and obtain a valid transport method.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Override
|
||||
public synchronized void resolve(JingleSession session) throws XMPPException, NotConnectedException, InterruptedException {
|
||||
|
|
|
@ -777,8 +777,8 @@ public abstract class TransportCandidate {
|
|||
String pt = addr[1];
|
||||
|
||||
// CHECKSTYLE:OFF
|
||||
if (pass.equals(password)
|
||||
&& transportCandidate.getIp().indexOf(ip) != -1
|
||||
if (pass.equals(password)
|
||||
&& transportCandidate.getIp().indexOf(ip) != -1
|
||||
&& transportCandidate.getPort() == Integer.parseInt(pt)) {
|
||||
// CHECKSTYLE:ON
|
||||
LOGGER.fine("ECHO OK: " + candidate.getIp() + ":" + candidate.getPort() + " <-> " + transportCandidate.getIp() + ":" + transportCandidate.getPort());
|
||||
|
|
|
@ -531,8 +531,8 @@ public abstract class TransportNegotiator extends JingleNegotiator {
|
|||
* Send an offer for a transport candidate
|
||||
*
|
||||
* @param cand
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
private synchronized void sendTransportCandidateOffer(TransportCandidate cand) throws NotConnectedException, InterruptedException {
|
||||
if (!cand.isNull()) {
|
||||
|
@ -554,8 +554,8 @@ public abstract class TransportNegotiator extends JingleNegotiator {
|
|||
* Create a Jingle stanza where we announce our transport candidates.
|
||||
*
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
private void sendTransportCandidatesOffer() throws XMPPException, SmackException, InterruptedException {
|
||||
List<TransportCandidate> notOffered = resolver.getCandidatesList();
|
||||
|
@ -603,8 +603,8 @@ public abstract class TransportNegotiator extends JingleNegotiator {
|
|||
* @param iq the stanza received
|
||||
* @return the new Jingle stanza to send.
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Override
|
||||
public final List<IQ> dispatchIncomingPacket(IQ iq, String id) throws XMPPException, SmackException, InterruptedException {
|
||||
|
@ -675,8 +675,8 @@ public abstract class TransportNegotiator extends JingleNegotiator {
|
|||
*
|
||||
* @return an IQ packet
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
private Jingle receiveResult(IQ iq) throws XMPPException, SmackException, InterruptedException {
|
||||
Jingle response = null;
|
||||
|
@ -690,8 +690,8 @@ public abstract class TransportNegotiator extends JingleNegotiator {
|
|||
/**
|
||||
* @param jingle
|
||||
* @return the iq
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
private IQ receiveSessionInitiateAction(Jingle jingle) throws XMPPException, SmackException, InterruptedException {
|
||||
IQ response = null;
|
||||
|
@ -793,8 +793,8 @@ public abstract class TransportNegotiator extends JingleNegotiator {
|
|||
*
|
||||
* @param local TransportCandidate that has been agreed.
|
||||
* @param remote TransportCandidate that has been agreed.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
private void triggerTransportEstablished(TransportCandidate local, TransportCandidate remote) throws NotConnectedException, InterruptedException {
|
||||
List<JingleListener> listeners = getListenersList();
|
||||
|
|
|
@ -90,13 +90,13 @@ public abstract class TransportResolver {
|
|||
|
||||
/**
|
||||
* Initialize the Resolver.
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public abstract void initialize() throws XMPPException, SmackException, InterruptedException;
|
||||
|
||||
/**
|
||||
* Start a the resolution.
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public abstract void resolve(JingleSession session) throws XMPPException, SmackException, InterruptedException;
|
||||
|
||||
|
@ -211,8 +211,8 @@ public abstract class TransportResolver {
|
|||
* Trigger a new candidate added event.
|
||||
*
|
||||
* @param cand The candidate added to the list of candidates.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
protected void triggerCandidateAdded(TransportCandidate cand) throws NotConnectedException, InterruptedException {
|
||||
Iterator<TransportResolverListener> iter = getListenersList().iterator();
|
||||
|
@ -269,8 +269,8 @@ public abstract class TransportResolver {
|
|||
* Add a new transport candidate
|
||||
*
|
||||
* @param cand The candidate to add
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
protected void addCandidate(TransportCandidate cand) throws NotConnectedException, InterruptedException {
|
||||
synchronized (candidates) {
|
||||
|
@ -360,8 +360,8 @@ public abstract class TransportResolver {
|
|||
|
||||
/**
|
||||
* Initialize Transport Resolver and wait until it is completely uninitialized.
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public void initializeAndWait() throws XMPPException, SmackException, InterruptedException {
|
||||
this.initialize();
|
||||
|
|
|
@ -35,8 +35,8 @@ public interface TransportResolverListener {
|
|||
* A transport candidate has been added.
|
||||
*
|
||||
* @param cand The transport candidate.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
void candidateAdded(TransportCandidate cand) throws NotConnectedException, InterruptedException;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.jivesoftware.smack.packet.ExtensionElement;
|
|||
|
||||
/**
|
||||
* Jingle content.
|
||||
*
|
||||
*
|
||||
* @author Jeff Williams
|
||||
*/
|
||||
public class JingleContent implements ExtensionElement {
|
||||
|
@ -59,7 +59,7 @@ public class JingleContent implements ExtensionElement {
|
|||
|
||||
/**
|
||||
* Returns the XML element name of the element.
|
||||
*
|
||||
*
|
||||
* @return the XML element name of the element.
|
||||
*/
|
||||
@Override
|
||||
|
@ -69,7 +69,7 @@ public class JingleContent implements ExtensionElement {
|
|||
|
||||
/**
|
||||
* Return the namespace.
|
||||
*
|
||||
*
|
||||
* @return The namespace
|
||||
*/
|
||||
@Override
|
||||
|
@ -80,7 +80,7 @@ public class JingleContent implements ExtensionElement {
|
|||
|
||||
/**
|
||||
* Sets the description for this Jingle content.
|
||||
*
|
||||
*
|
||||
* @param description
|
||||
* The description
|
||||
*/
|
||||
|
@ -90,7 +90,7 @@ public class JingleContent implements ExtensionElement {
|
|||
|
||||
/**
|
||||
* Gets the description for this Jingle content.
|
||||
*
|
||||
*
|
||||
* @return The description.
|
||||
*/
|
||||
public JingleDescription getDescription() {
|
||||
|
@ -99,7 +99,7 @@ public class JingleContent implements ExtensionElement {
|
|||
|
||||
/**
|
||||
* Adds a JingleTransport type to the packet.
|
||||
*
|
||||
*
|
||||
* @param transport
|
||||
* the JingleTransport to add.
|
||||
*/
|
||||
|
@ -111,7 +111,7 @@ public class JingleContent implements ExtensionElement {
|
|||
|
||||
/**
|
||||
* Adds a list of transports to add to the packet.
|
||||
*
|
||||
*
|
||||
* @param transports
|
||||
* the transports to add.
|
||||
*/
|
||||
|
@ -125,7 +125,7 @@ public class JingleContent implements ExtensionElement {
|
|||
|
||||
/**
|
||||
* Returns an Iterator for the JingleTransports in the packet.
|
||||
*
|
||||
*
|
||||
* @return an Iterator for the JingleTransports in the packet.
|
||||
*/
|
||||
public Iterator<JingleTransport> getJingleTransports() {
|
||||
|
@ -134,7 +134,7 @@ public class JingleContent implements ExtensionElement {
|
|||
|
||||
/**
|
||||
* Returns a list for the JingleTransports in the packet.
|
||||
*
|
||||
*
|
||||
* @return a list for the JingleTransports in the packet.
|
||||
*/
|
||||
public List<JingleTransport> getJingleTransportsList() {
|
||||
|
@ -145,7 +145,7 @@ public class JingleContent implements ExtensionElement {
|
|||
|
||||
/**
|
||||
* Returns a count of the JingleTransports in the Jingle packet.
|
||||
*
|
||||
*
|
||||
* @return the number of the JingleTransports in the Jingle packet.
|
||||
*/
|
||||
public int getJingleTransportsCount() {
|
||||
|
@ -156,7 +156,7 @@ public class JingleContent implements ExtensionElement {
|
|||
|
||||
/**
|
||||
* Convert a Jingle description to XML.
|
||||
*
|
||||
*
|
||||
* @return a string with the XML representation
|
||||
*/
|
||||
@Override
|
||||
|
|
|
@ -66,9 +66,9 @@ public abstract class JingleContentDescriptionProvider extends ExtensionElementP
|
|||
*
|
||||
* @param parser the input to parse
|
||||
* @return a description element
|
||||
* @throws IOException
|
||||
* @throws XmlPullParserException
|
||||
* @throws SmackException
|
||||
* @throws IOException
|
||||
* @throws XmlPullParserException
|
||||
* @throws SmackException
|
||||
*/
|
||||
@Override
|
||||
public JingleContentDescription parse(XmlPullParser parser,
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.xmlpull.v1.XmlPullParser;
|
|||
|
||||
/**
|
||||
* Jingle <content> provider.
|
||||
*
|
||||
*
|
||||
* @author Jeff Williams
|
||||
*/
|
||||
public class JingleContentProvider extends ExtensionElementProvider<JingleContent> {
|
||||
|
|
|
@ -29,14 +29,14 @@ import org.xmlpull.v1.XmlPullParserException;
|
|||
|
||||
/**
|
||||
* Parser for a Jingle description.
|
||||
*
|
||||
*
|
||||
* @author Alvaro Saurin
|
||||
*/
|
||||
public abstract class JingleDescriptionProvider extends ExtensionElementProvider<JingleDescription> {
|
||||
|
||||
/**
|
||||
* Parse a iq/jingle/description/payload-type element.
|
||||
*
|
||||
*
|
||||
* @param parser
|
||||
* the input to parse
|
||||
* @return a payload type element
|
||||
|
@ -63,13 +63,13 @@ public abstract class JingleDescriptionProvider extends ExtensionElementProvider
|
|||
|
||||
/**
|
||||
* Parse a iq/jingle/description element.
|
||||
*
|
||||
*
|
||||
* @param parser
|
||||
* the input to parse
|
||||
* @return a description element
|
||||
* @throws SmackException
|
||||
* @throws IOException
|
||||
* @throws XmlPullParserException
|
||||
* @throws SmackException
|
||||
* @throws IOException
|
||||
* @throws XmlPullParserException
|
||||
*/
|
||||
@Override
|
||||
public JingleDescription parse(XmlPullParser parser, int initialDepth) throws SmackException, XmlPullParserException, IOException {
|
||||
|
|
|
@ -34,14 +34,14 @@ import org.xmlpull.v1.XmlPullParser;
|
|||
|
||||
/**
|
||||
* The JingleProvider parses Jingle packets.
|
||||
*
|
||||
*
|
||||
* @author Alvaro Saurin
|
||||
*/
|
||||
public class JingleProvider extends IQProvider<Jingle> {
|
||||
|
||||
/**
|
||||
* Parse a iq/jingle element.
|
||||
* @throws Exception
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public Jingle parse(XmlPullParser parser, int intialDepth)
|
||||
|
|
|
@ -50,9 +50,9 @@ public abstract class JingleTransportProvider extends ExtensionElementProvider<J
|
|||
*
|
||||
* @param parser the structure to parse
|
||||
* @return a transport element.
|
||||
* @throws IOException
|
||||
* @throws XmlPullParserException
|
||||
* @throws SmackException
|
||||
* @throws IOException
|
||||
* @throws XmlPullParserException
|
||||
* @throws SmackException
|
||||
*/
|
||||
@Override
|
||||
public JingleTransport parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException, SmackException {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue