Change Candidate's get/setTurnServerAddress() to get/setRelayServerAddress() to be more generic in naming relays. Typos and text formatting.

This commit is contained in:
seb 2010-12-09 10:29:58 +00:00
parent 7e868bb3f1
commit cfa0e2973d
7 changed files with 26 additions and 23 deletions

View File

@ -1171,7 +1171,6 @@ public class Agent
if(!pair.isNominated() if(!pair.isNominated()
&& !parentStream.validListContainsNomineeForComponent( && !parentStream.validListContainsNomineeForComponent(
parentComponent)) parentComponent))
/* && !checkList.containsNomineeForComponent(parentComponent)) */
{ {
pair.nominate(); pair.nominate();
pair.getParentComponent().getParentStream() pair.getParentComponent().getParentStream()

View File

@ -90,11 +90,11 @@ public abstract class Candidate
private TransportAddress stunServerAddress = null; private TransportAddress stunServerAddress = null;
/** /**
* The address of the TURN server that was used to obtain this * The address of the relay server (i.e. TURN, Jingle Nodes, ...) that was
* <tt>Candidate</tt>. Will be <tt>null</tt> if this is not a relayed * used to obtain this <tt>Candidate</tt>. Will be <tt>null</tt> if this is
* candidate. * not a relayed candidate.
*/ */
private TransportAddress turnServerAddress = null; private TransportAddress relayServerAddress = null;
/** /**
* The address that our TURN/STUN server returned as mapped if this is a * The address that our TURN/STUN server returned as mapped if this is a
@ -442,7 +442,6 @@ public abstract class Candidate
//IPv4 //IPv4
return 10; return 10;
} }
} }
/** /**
@ -511,28 +510,30 @@ public abstract class Candidate
} }
/** /**
* Returns the address of the TURN server that was used to obtain this * Returns the address of the relay server (i.e. TURN, Jingle Nodes, ...)
* <tt>Candidate</tt> or <tt>null</tt> if this is not a relayed candidate. * that was used to obtain this <tt>Candidate</tt> or <tt>null</tt> if this
* is not a relayed candidate.
* *
* @return the address of the TURN server that was used to obtain this * @return the address of the relay server that was used to obtain this
* <tt>Candidate</tt> or <tt>null</tt> if this is not a relayed candidate. * <tt>Candidate</tt> or <tt>null</tt> if this is not a relayed candidate.
*/ */
public TransportAddress getTurnServerAddress() public TransportAddress getRelayServerAddress()
{ {
return turnServerAddress; return relayServerAddress;
} }
/** /**
* Sets the address of the TURN server that was used to obtain this * Sets the address of the relay server (i.e. TURN, Jingle Nodes, ...) that
* <tt>Candidate</tt>. Only makes sense if this is a relayed candidate. * was used to obtain this <tt>Candidate</tt>. Only makes sense if this is a
* relayed candidate.
* *
* @param address the address of the TURN server that was used to obtain * @param address the address of the relay server that was used to obtain
* this <tt>Candidate</tt> or <tt>null</tt> if this is not a relayed * this <tt>Candidate</tt> or <tt>null</tt> if this is not a relayed
* candidate. * candidate.
*/ */
protected void setTurnServerAddress(TransportAddress address) protected void setRelayServerAddress(TransportAddress address)
{ {
this.turnServerAddress = address; this.relayServerAddress = address;
} }
/** /**

View File

@ -57,7 +57,7 @@ public class FoundationsRegistry
server = candidate.getStunServerAddress().getHostAddress(); server = candidate.getStunServerAddress().getHostAddress();
break; break;
case RELAYED_CANDIDATE: case RELAYED_CANDIDATE:
server = candidate.getTurnServerAddress().getHostAddress(); server = candidate.getRelayServerAddress().getHostAddress();
break; break;
default: default:
server = null; server = null;

View File

@ -72,7 +72,7 @@ public class RelayedCandidate
// RFC 5245: The base of a relayed candidate is that candidate itself. // RFC 5245: The base of a relayed candidate is that candidate itself.
setBase(this); setBase(this);
setTurnServerAddress(turnCandidateHarvest.harvester.stunServer); setRelayServerAddress(turnCandidateHarvest.harvester.stunServer);
setMappedAddress(mappedAddress); setMappedAddress(mappedAddress);
} }

View File

@ -61,7 +61,7 @@ public class StunCandidateHarvester
public final TransportAddress stunServer; public final TransportAddress stunServer;
/** /**
* The <tt>StunSTack</tt> used by this instance for the purposes of STUN * The <tt>StunStack</tt> used by this instance for the purposes of STUN
* communication. * communication.
*/ */
private StunStack stunStack; private StunStack stunStack;

View File

@ -401,10 +401,12 @@ public class TurnCandidateHarvest
/** /**
* Creates a new <tt>Request</tt> which is to be sent to * Creates a new <tt>Request</tt> which is to be sent to
* {@link TurnCandidateHarvester#stunServer} in order to start resolving {@link #hostCandidate}. * {@link TurnCandidateHarvester#stunServer} in order to start resolving
* {@link #hostCandidate}.
* *
* @return a new <tt>Request</tt> which is to be sent to * @return a new <tt>Request</tt> which is to be sent to
* {@link TurnCandidateHarvester#stunServer} in order to start resolving {@link #hostCandidate} * {@link TurnCandidateHarvester#stunServer} in order to start resolving
* {@link #hostCandidate}
* @see StunCandidateHarvest#createRequestToStartResolvingCandidate() * @see StunCandidateHarvest#createRequestToStartResolvingCandidate()
*/ */
@Override @Override

View File

@ -453,7 +453,7 @@ public class RelayedCandidateDatagramSocket
/** /**
* Returns the port number on the local host to which this socket is bound. * Returns the port number on the local host to which this socket is bound.
* <tt>RelayedCandidateDatagram</tt> returns the <tt>port</tt> of its * <tt>RelayedCandidateDatagramSocket</tt> returns the <tt>port</tt> of its
* <tt>localSocketAddress</tt>. * <tt>localSocketAddress</tt>.
* *
* @return the port number on the local host to which this socket is bound * @return the port number on the local host to which this socket is bound
@ -1433,7 +1433,8 @@ public class RelayedCandidateDatagramSocket
turnCandidateHarvest.harvester.stunServer); turnCandidateHarvest.harvester.stunServer);
} }
else else
channelDataPacket.setData(channelData, 0, channelDataLength); channelDataPacket.setData(channelData, 0,
channelDataLength);
channelDataSocket.send(channelDataPacket); channelDataSocket.send(channelDataPacket);
} }