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:
Thiago Camargo 2007-02-15 14:28:39 +00:00 committed by thiago
parent a4cc45f75d
commit 9d598f1398
7 changed files with 45 additions and 25 deletions

View File

@ -143,7 +143,6 @@ public class IncomingJingleSession extends JingleSession {
public void start(JingleSessionRequest initialJingleSessionRequest) throws XMPPException {
if (invalidState()) {
Jingle packet = initialJingleSessionRequest.getJingle();
System.out.println("invalidState");
if (packet != null) {
// Initialize the session information
@ -226,6 +225,16 @@ public class IncomingJingleSession extends JingleSession {
triggerSessionClosedOnError(new JingleException(iq.getError().getMessage()));
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() {
// Add the listeners to the sub-negotiators...
System.out.println("Pending eventEnter");
addMediaListener(jingleMediaListener);
addTransportListener(jingleTransportListener);
super.eventEnter();
@ -374,6 +382,16 @@ public class IncomingJingleSession extends JingleSession {
triggerSessionClosedOnError(new XMPPException(iq.getError()));
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();
// Trigger the session established flag
System.out.println("eventEntered");
triggerSessionEstablished(bestCommonAudioPt, bestRemoteCandidate,
acceptedLocalCandidate);

View File

@ -426,9 +426,6 @@ public abstract class JingleSession extends JingleNegotiator {
jout = getState().eventRedirect(jin);
}
else if (action.equals(Jingle.Action.SESSIONTERMINATE)) {
System.out.println("SESSION PACKET");
jout = getState().eventTerminate(jin);
}
}
@ -766,11 +763,9 @@ public abstract class JingleSession extends JingleNegotiator {
return true;
}
if (obj == null) {
System.out.println("NULL");
return false;
}
if (getClass() != obj.getClass()) {
System.out.println("CLASS DIFF");
return false;
}
@ -885,6 +880,7 @@ public abstract class JingleSession extends JingleNegotiator {
protected void removePacketListener() {
if (packetListener != null) {
getConnection().removePacketListener(packetListener);
System.out.println("REMOVE PACKET LISTENER");
}
}
@ -962,7 +958,6 @@ public abstract class JingleSession extends JingleNegotiator {
};
getConnection().addPacketListener(packetListener, packetFilter);
System.out.println("updatePacketListener");
}
// Listeners

View File

@ -73,7 +73,7 @@ import java.util.List;
/**
* An outgoing Jingle session implementation.
* 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
* JingleManager class, that will create the appropiate instance...
*
@ -98,7 +98,7 @@ public class OutgoingJingleSession extends JingleSession {
* @param resolver The transport resolver.
*/
protected OutgoingJingleSession(XMPPConnection conn, String responder,
List payloadTypes, TransportResolver resolver) {
List payloadTypes, TransportResolver resolver) {
super(conn, conn.getUser(), responder);
@ -129,7 +129,7 @@ public class OutgoingJingleSession extends JingleSession {
* @param jingleMediaManager The Media Manager for this Session
*/
protected OutgoingJingleSession(XMPPConnection conn, String responder,
List payloadTypes, TransportResolver resolver, JingleMediaManager jingleMediaManager) {
List payloadTypes, TransportResolver resolver, JingleMediaManager jingleMediaManager) {
this(conn, responder, payloadTypes, resolver);
this.jingleMediaManager = jingleMediaManager;
}
@ -150,11 +150,13 @@ public class OutgoingJingleSession extends JingleSession {
try {
updatePacketListener();
respond((Jingle) null);
} catch (XMPPException e) {
}
catch (XMPPException e) {
e.printStackTrace();
close();
}
} else {
}
else {
throw new IllegalStateException("Starting session without null state.");
}
}
@ -223,6 +225,16 @@ public class OutgoingJingleSession extends JingleSession {
triggerSessionRedirect(redirArg);
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...
*/
public class Pending extends JingleNegotiator.State {
JingleMediaListener jingleMediaListener;
JingleTransportListener jingleTransportListener;
@ -252,7 +265,7 @@ public class OutgoingJingleSession extends JingleSession {
jingleTransportListener = new JingleTransportListener() {
public void transportEstablished(TransportCandidate local,
TransportCandidate remote) {
TransportCandidate remote) {
checkFullyEstablished();
}
@ -338,7 +351,8 @@ public class OutgoingJingleSession extends JingleSession {
.getAcceptedLocalCandidate())) {
setState(active);
}
} else {
}
else {
throw new JingleException(JingleError.NEGOTIATION_ERROR);
}
}
@ -374,7 +388,7 @@ public class OutgoingJingleSession extends JingleSession {
* @throws XMPPException
*/
public Jingle eventTerminate(Jingle jin) throws XMPPException {
triggerSessionDeclined(null);
triggerSessionClosed("Closed Remotely");
return super.eventTerminate(jin);
}
@ -393,6 +407,7 @@ public class OutgoingJingleSession extends JingleSession {
* State when we have an established session.
*/
public class Active extends JingleNegotiator.State {
public Active(JingleNegotiator neg) {
super(neg);
}
@ -410,7 +425,6 @@ public class OutgoingJingleSession extends JingleSession {
.getAcceptedLocalCandidate();
// Trigger the session established flag
System.out.println("eventEntered");
triggerSessionEstablished(bestCommonAudioPt, bestRemoteCandidate,
acceptedLocalCandidate);

View File

@ -28,7 +28,6 @@ public class FixedResolver extends TransportResolver {
* @param port a port
*/
public void setFixedCandidate(String ip, int port) {
System.out.println("FIXED");
fixedCandidate = new TransportCandidate.Fixed(ip, port);
}

View File

@ -400,7 +400,7 @@ public class RTPBridge extends IQ {
return false;
}
System.out.println("service listing");
System.out.println("Service listing");
ServiceDiscoveryManager disco = ServiceDiscoveryManager
.getInstanceFor(xmppConnection);

View File

@ -207,7 +207,6 @@ public abstract class TransportNegotiator extends JingleNegotiator {
* @param offeredCandidate a transport candidates to check
*/
private void checkRemoteCandidate(final TransportCandidate offeredCandidate) {
System.out.println("CHECK");
offeredCandidate.addListener(new TransportResolverListener.Checker() {
public void candidateChecked(TransportCandidate cand,
final boolean validCandidate) {
@ -336,7 +335,6 @@ public abstract class TransportNegotiator extends JingleNegotiator {
*/
private void addRemoteCandidates(List rc) {
if (rc != null) {
System.out.println("SIZE OF LISTA: " + rc.size());
if (rc.size() > 0) {
for (Object aRc : rc) {
addRemoteCandidate((TransportCandidate) aRc);
@ -359,8 +357,6 @@ public abstract class TransportNegotiator extends JingleNegotiator {
while (iTrans.hasNext()) {
org.jivesoftware.smackx.packet.JingleTransport trans = (org.jivesoftware.smackx.packet.JingleTransport) iTrans.next();
System.out.println("LISTA SIZE: " + trans.getCandidatesCount());
Iterator iCand = trans.getCandidates();
while (iCand.hasNext()) {
JingleTransportCandidate cand = (JingleTransportCandidate) iCand

View File

@ -316,7 +316,6 @@ public abstract class TransportResolver {
*/
public Iterator getCandidates() {
synchronized (candidates) {
System.out.println("CNUM: " + candidates.size());
return Collections.unmodifiableList(new ArrayList(candidates)).iterator();
}
}