mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-01-09 19:37:58 +01:00
Remove superfluous trace
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@7142 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
a4cc45f75d
commit
9d598f1398
7 changed files with 45 additions and 25 deletions
|
@ -143,7 +143,6 @@ public class IncomingJingleSession extends JingleSession {
|
||||||
public void start(JingleSessionRequest initialJingleSessionRequest) throws XMPPException {
|
public void start(JingleSessionRequest initialJingleSessionRequest) throws XMPPException {
|
||||||
if (invalidState()) {
|
if (invalidState()) {
|
||||||
Jingle packet = initialJingleSessionRequest.getJingle();
|
Jingle packet = initialJingleSessionRequest.getJingle();
|
||||||
System.out.println("invalidState");
|
|
||||||
if (packet != null) {
|
if (packet != null) {
|
||||||
|
|
||||||
// Initialize the session information
|
// Initialize the session information
|
||||||
|
@ -226,6 +225,16 @@ public class IncomingJingleSession extends JingleSession {
|
||||||
triggerSessionClosedOnError(new JingleException(iq.getError().getMessage()));
|
triggerSessionClosedOnError(new JingleException(iq.getError().getMessage()));
|
||||||
super.eventError(iq);
|
super.eventError(iq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Terminate the connection.
|
||||||
|
*
|
||||||
|
* @see org.jivesoftware.smackx.jingle.JingleNegotiator.State#eventTerminate(org.jivesoftware.smackx.packet.Jingle)
|
||||||
|
*/
|
||||||
|
public Jingle eventTerminate(Jingle jin) throws XMPPException {
|
||||||
|
triggerSessionClosed("Closed Remotely");
|
||||||
|
return super.eventTerminate(jin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -273,7 +282,6 @@ public class IncomingJingleSession extends JingleSession {
|
||||||
*/
|
*/
|
||||||
public void eventEnter() {
|
public void eventEnter() {
|
||||||
// Add the listeners to the sub-negotiators...
|
// Add the listeners to the sub-negotiators...
|
||||||
System.out.println("Pending eventEnter");
|
|
||||||
addMediaListener(jingleMediaListener);
|
addMediaListener(jingleMediaListener);
|
||||||
addTransportListener(jingleTransportListener);
|
addTransportListener(jingleTransportListener);
|
||||||
super.eventEnter();
|
super.eventEnter();
|
||||||
|
@ -374,6 +382,16 @@ public class IncomingJingleSession extends JingleSession {
|
||||||
triggerSessionClosedOnError(new XMPPException(iq.getError()));
|
triggerSessionClosedOnError(new XMPPException(iq.getError()));
|
||||||
super.eventError(iq);
|
super.eventError(iq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Terminate the connection.
|
||||||
|
*
|
||||||
|
* @see org.jivesoftware.smackx.jingle.JingleNegotiator.State#eventTerminate(org.jivesoftware.smackx.packet.Jingle)
|
||||||
|
*/
|
||||||
|
public Jingle eventTerminate(Jingle jin) throws XMPPException {
|
||||||
|
triggerSessionClosed("Closed Remotely");
|
||||||
|
return super.eventTerminate(jin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -398,7 +416,6 @@ public class IncomingJingleSession extends JingleSession {
|
||||||
.getAcceptedLocalCandidate();
|
.getAcceptedLocalCandidate();
|
||||||
|
|
||||||
// Trigger the session established flag
|
// Trigger the session established flag
|
||||||
System.out.println("eventEntered");
|
|
||||||
triggerSessionEstablished(bestCommonAudioPt, bestRemoteCandidate,
|
triggerSessionEstablished(bestCommonAudioPt, bestRemoteCandidate,
|
||||||
acceptedLocalCandidate);
|
acceptedLocalCandidate);
|
||||||
|
|
||||||
|
|
|
@ -426,9 +426,6 @@ public abstract class JingleSession extends JingleNegotiator {
|
||||||
jout = getState().eventRedirect(jin);
|
jout = getState().eventRedirect(jin);
|
||||||
}
|
}
|
||||||
else if (action.equals(Jingle.Action.SESSIONTERMINATE)) {
|
else if (action.equals(Jingle.Action.SESSIONTERMINATE)) {
|
||||||
|
|
||||||
System.out.println("SESSION PACKET");
|
|
||||||
|
|
||||||
jout = getState().eventTerminate(jin);
|
jout = getState().eventTerminate(jin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -766,11 +763,9 @@ public abstract class JingleSession extends JingleNegotiator {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (obj == null) {
|
if (obj == null) {
|
||||||
System.out.println("NULL");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (getClass() != obj.getClass()) {
|
if (getClass() != obj.getClass()) {
|
||||||
System.out.println("CLASS DIFF");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -885,6 +880,7 @@ public abstract class JingleSession extends JingleNegotiator {
|
||||||
protected void removePacketListener() {
|
protected void removePacketListener() {
|
||||||
if (packetListener != null) {
|
if (packetListener != null) {
|
||||||
getConnection().removePacketListener(packetListener);
|
getConnection().removePacketListener(packetListener);
|
||||||
|
|
||||||
System.out.println("REMOVE PACKET LISTENER");
|
System.out.println("REMOVE PACKET LISTENER");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -962,7 +958,6 @@ public abstract class JingleSession extends JingleNegotiator {
|
||||||
};
|
};
|
||||||
|
|
||||||
getConnection().addPacketListener(packetListener, packetFilter);
|
getConnection().addPacketListener(packetListener, packetFilter);
|
||||||
System.out.println("updatePacketListener");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
|
@ -73,7 +73,7 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* An outgoing Jingle session implementation.
|
* An outgoing Jingle session implementation.
|
||||||
* This class has especific bahavior to Request and establish a new Jingle Session.
|
* This class has especific bahavior to Request and establish a new Jingle Session.
|
||||||
*
|
* <p/>
|
||||||
* This class is not directly used by users. Instead, users should refer to the
|
* This class is not directly used by users. Instead, users should refer to the
|
||||||
* JingleManager class, that will create the appropiate instance...
|
* JingleManager class, that will create the appropiate instance...
|
||||||
*
|
*
|
||||||
|
@ -98,7 +98,7 @@ public class OutgoingJingleSession extends JingleSession {
|
||||||
* @param resolver The transport resolver.
|
* @param resolver The transport resolver.
|
||||||
*/
|
*/
|
||||||
protected OutgoingJingleSession(XMPPConnection conn, String responder,
|
protected OutgoingJingleSession(XMPPConnection conn, String responder,
|
||||||
List payloadTypes, TransportResolver resolver) {
|
List payloadTypes, TransportResolver resolver) {
|
||||||
|
|
||||||
super(conn, conn.getUser(), responder);
|
super(conn, conn.getUser(), responder);
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ public class OutgoingJingleSession extends JingleSession {
|
||||||
* @param jingleMediaManager The Media Manager for this Session
|
* @param jingleMediaManager The Media Manager for this Session
|
||||||
*/
|
*/
|
||||||
protected OutgoingJingleSession(XMPPConnection conn, String responder,
|
protected OutgoingJingleSession(XMPPConnection conn, String responder,
|
||||||
List payloadTypes, TransportResolver resolver, JingleMediaManager jingleMediaManager) {
|
List payloadTypes, TransportResolver resolver, JingleMediaManager jingleMediaManager) {
|
||||||
this(conn, responder, payloadTypes, resolver);
|
this(conn, responder, payloadTypes, resolver);
|
||||||
this.jingleMediaManager = jingleMediaManager;
|
this.jingleMediaManager = jingleMediaManager;
|
||||||
}
|
}
|
||||||
|
@ -150,11 +150,13 @@ public class OutgoingJingleSession extends JingleSession {
|
||||||
try {
|
try {
|
||||||
updatePacketListener();
|
updatePacketListener();
|
||||||
respond((Jingle) null);
|
respond((Jingle) null);
|
||||||
} catch (XMPPException e) {
|
}
|
||||||
|
catch (XMPPException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
throw new IllegalStateException("Starting session without null state.");
|
throw new IllegalStateException("Starting session without null state.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -223,6 +225,16 @@ public class OutgoingJingleSession extends JingleSession {
|
||||||
triggerSessionRedirect(redirArg);
|
triggerSessionRedirect(redirArg);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Terminate the connection.
|
||||||
|
*
|
||||||
|
* @see org.jivesoftware.smackx.jingle.JingleNegotiator.State#eventTerminate(org.jivesoftware.smackx.packet.Jingle)
|
||||||
|
*/
|
||||||
|
public Jingle eventTerminate(Jingle jin) throws XMPPException {
|
||||||
|
triggerSessionClosed("Closed Remotely");
|
||||||
|
return super.eventTerminate(jin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -232,6 +244,7 @@ public class OutgoingJingleSession extends JingleSession {
|
||||||
* Note: the transition from/to this state is done with listeners...
|
* Note: the transition from/to this state is done with listeners...
|
||||||
*/
|
*/
|
||||||
public class Pending extends JingleNegotiator.State {
|
public class Pending extends JingleNegotiator.State {
|
||||||
|
|
||||||
JingleMediaListener jingleMediaListener;
|
JingleMediaListener jingleMediaListener;
|
||||||
|
|
||||||
JingleTransportListener jingleTransportListener;
|
JingleTransportListener jingleTransportListener;
|
||||||
|
@ -252,7 +265,7 @@ public class OutgoingJingleSession extends JingleSession {
|
||||||
|
|
||||||
jingleTransportListener = new JingleTransportListener() {
|
jingleTransportListener = new JingleTransportListener() {
|
||||||
public void transportEstablished(TransportCandidate local,
|
public void transportEstablished(TransportCandidate local,
|
||||||
TransportCandidate remote) {
|
TransportCandidate remote) {
|
||||||
checkFullyEstablished();
|
checkFullyEstablished();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,7 +351,8 @@ public class OutgoingJingleSession extends JingleSession {
|
||||||
.getAcceptedLocalCandidate())) {
|
.getAcceptedLocalCandidate())) {
|
||||||
setState(active);
|
setState(active);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
throw new JingleException(JingleError.NEGOTIATION_ERROR);
|
throw new JingleException(JingleError.NEGOTIATION_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -374,7 +388,7 @@ public class OutgoingJingleSession extends JingleSession {
|
||||||
* @throws XMPPException
|
* @throws XMPPException
|
||||||
*/
|
*/
|
||||||
public Jingle eventTerminate(Jingle jin) throws XMPPException {
|
public Jingle eventTerminate(Jingle jin) throws XMPPException {
|
||||||
triggerSessionDeclined(null);
|
triggerSessionClosed("Closed Remotely");
|
||||||
return super.eventTerminate(jin);
|
return super.eventTerminate(jin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -393,6 +407,7 @@ public class OutgoingJingleSession extends JingleSession {
|
||||||
* State when we have an established session.
|
* State when we have an established session.
|
||||||
*/
|
*/
|
||||||
public class Active extends JingleNegotiator.State {
|
public class Active extends JingleNegotiator.State {
|
||||||
|
|
||||||
public Active(JingleNegotiator neg) {
|
public Active(JingleNegotiator neg) {
|
||||||
super(neg);
|
super(neg);
|
||||||
}
|
}
|
||||||
|
@ -410,7 +425,6 @@ public class OutgoingJingleSession extends JingleSession {
|
||||||
.getAcceptedLocalCandidate();
|
.getAcceptedLocalCandidate();
|
||||||
|
|
||||||
// Trigger the session established flag
|
// Trigger the session established flag
|
||||||
System.out.println("eventEntered");
|
|
||||||
triggerSessionEstablished(bestCommonAudioPt, bestRemoteCandidate,
|
triggerSessionEstablished(bestCommonAudioPt, bestRemoteCandidate,
|
||||||
acceptedLocalCandidate);
|
acceptedLocalCandidate);
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ public class FixedResolver extends TransportResolver {
|
||||||
* @param port a port
|
* @param port a port
|
||||||
*/
|
*/
|
||||||
public void setFixedCandidate(String ip, int port) {
|
public void setFixedCandidate(String ip, int port) {
|
||||||
System.out.println("FIXED");
|
|
||||||
fixedCandidate = new TransportCandidate.Fixed(ip, port);
|
fixedCandidate = new TransportCandidate.Fixed(ip, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -400,7 +400,7 @@ public class RTPBridge extends IQ {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("service listing");
|
System.out.println("Service listing");
|
||||||
|
|
||||||
ServiceDiscoveryManager disco = ServiceDiscoveryManager
|
ServiceDiscoveryManager disco = ServiceDiscoveryManager
|
||||||
.getInstanceFor(xmppConnection);
|
.getInstanceFor(xmppConnection);
|
||||||
|
|
|
@ -207,7 +207,6 @@ public abstract class TransportNegotiator extends JingleNegotiator {
|
||||||
* @param offeredCandidate a transport candidates to check
|
* @param offeredCandidate a transport candidates to check
|
||||||
*/
|
*/
|
||||||
private void checkRemoteCandidate(final TransportCandidate offeredCandidate) {
|
private void checkRemoteCandidate(final TransportCandidate offeredCandidate) {
|
||||||
System.out.println("CHECK");
|
|
||||||
offeredCandidate.addListener(new TransportResolverListener.Checker() {
|
offeredCandidate.addListener(new TransportResolverListener.Checker() {
|
||||||
public void candidateChecked(TransportCandidate cand,
|
public void candidateChecked(TransportCandidate cand,
|
||||||
final boolean validCandidate) {
|
final boolean validCandidate) {
|
||||||
|
@ -336,7 +335,6 @@ public abstract class TransportNegotiator extends JingleNegotiator {
|
||||||
*/
|
*/
|
||||||
private void addRemoteCandidates(List rc) {
|
private void addRemoteCandidates(List rc) {
|
||||||
if (rc != null) {
|
if (rc != null) {
|
||||||
System.out.println("SIZE OF LISTA: " + rc.size());
|
|
||||||
if (rc.size() > 0) {
|
if (rc.size() > 0) {
|
||||||
for (Object aRc : rc) {
|
for (Object aRc : rc) {
|
||||||
addRemoteCandidate((TransportCandidate) aRc);
|
addRemoteCandidate((TransportCandidate) aRc);
|
||||||
|
@ -359,8 +357,6 @@ public abstract class TransportNegotiator extends JingleNegotiator {
|
||||||
while (iTrans.hasNext()) {
|
while (iTrans.hasNext()) {
|
||||||
org.jivesoftware.smackx.packet.JingleTransport trans = (org.jivesoftware.smackx.packet.JingleTransport) iTrans.next();
|
org.jivesoftware.smackx.packet.JingleTransport trans = (org.jivesoftware.smackx.packet.JingleTransport) iTrans.next();
|
||||||
|
|
||||||
System.out.println("LISTA SIZE: " + trans.getCandidatesCount());
|
|
||||||
|
|
||||||
Iterator iCand = trans.getCandidates();
|
Iterator iCand = trans.getCandidates();
|
||||||
while (iCand.hasNext()) {
|
while (iCand.hasNext()) {
|
||||||
JingleTransportCandidate cand = (JingleTransportCandidate) iCand
|
JingleTransportCandidate cand = (JingleTransportCandidate) iCand
|
||||||
|
|
|
@ -316,7 +316,6 @@ public abstract class TransportResolver {
|
||||||
*/
|
*/
|
||||||
public Iterator getCandidates() {
|
public Iterator getCandidates() {
|
||||||
synchronized (candidates) {
|
synchronized (candidates) {
|
||||||
System.out.println("CNUM: " + candidates.size());
|
|
||||||
return Collections.unmodifiableList(new ArrayList(candidates)).iterator();
|
return Collections.unmodifiableList(new ArrayList(candidates)).iterator();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue