Fixes warnings, javadocs, formatting.
This commit is contained in:
parent
a10d5e6687
commit
3f6e5c7564
@ -17,7 +17,6 @@ import java.util.logging.*;
|
|||||||
|
|
||||||
import org.ice4j.*;
|
import org.ice4j.*;
|
||||||
import org.ice4j.ice.harvest.*;
|
import org.ice4j.ice.harvest.*;
|
||||||
import org.ice4j.message.*;
|
|
||||||
import org.ice4j.stack.*;
|
import org.ice4j.stack.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -56,17 +55,17 @@ public class Agent
|
|||||||
= new PropertyChangeListener[0];
|
= new PropertyChangeListener[0];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The <tt>Logger</tt> used by the <tt>Agent</tt>
|
* The <tt>Logger</tt> used by the <tt>Agent</tt> class and its instances
|
||||||
* class and its instances for logging output.
|
* for logging output.
|
||||||
*/
|
*/
|
||||||
private static final Logger logger = Logger
|
private static final Logger logger
|
||||||
.getLogger(Agent.class.getName());
|
= Logger.getLogger(Agent.class.getName());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The LinkedHashMap used to store the media streams
|
* The LinkedHashMap used to store the media streams
|
||||||
* This map preserves the insertion order of the media streams.
|
* This map preserves the insertion order of the media streams.
|
||||||
*/
|
*/
|
||||||
private Map<String, IceMediaStream> mediaStreams
|
private final Map<String, IceMediaStream> mediaStreams
|
||||||
= new LinkedHashMap<String, IceMediaStream>();
|
= new LinkedHashMap<String, IceMediaStream>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -119,7 +118,7 @@ public class Agent
|
|||||||
* the necessary triggered checks.
|
* the necessary triggered checks.
|
||||||
*/
|
*/
|
||||||
private final List<CandidatePair> preDiscoveredPairsQueue
|
private final List<CandidatePair> preDiscoveredPairsQueue
|
||||||
= new Vector<CandidatePair>();
|
= new LinkedList<CandidatePair>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The lock that we use while starting connectivity establishment.
|
* The lock that we use while starting connectivity establishment.
|
||||||
@ -467,12 +466,18 @@ public class Agent
|
|||||||
= stateListeners.toArray(NO_STATE_CHANGE_LISTENERS);
|
= stateListeners.toArray(NO_STATE_CHANGE_LISTENERS);
|
||||||
}
|
}
|
||||||
|
|
||||||
PropertyChangeEvent evt = new PropertyChangeEvent(
|
if (stateListenersCopy.length != 0)
|
||||||
this, PROPERTY_ICE_PROCESSING_STATE, oldState, newState);
|
{
|
||||||
|
PropertyChangeEvent evt
|
||||||
|
= new PropertyChangeEvent(
|
||||||
|
this,
|
||||||
|
PROPERTY_ICE_PROCESSING_STATE,
|
||||||
|
oldState, newState);
|
||||||
|
|
||||||
for(PropertyChangeListener l : stateListenersCopy)
|
for(PropertyChangeListener l : stateListenersCopy)
|
||||||
l.propertyChange(evt);
|
l.propertyChange(evt);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@link IceProcessingState} of this <tt>Agent</tt> to
|
* Sets the {@link IceProcessingState} of this <tt>Agent</tt> to
|
||||||
@ -772,7 +777,7 @@ public class Agent
|
|||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer buff = new StringBuffer("ICE Agent (stream-count=");
|
StringBuilder buff = new StringBuilder("ICE Agent (stream-count=");
|
||||||
|
|
||||||
buff.append(getStreamCount()).append(" ice-pwd:")
|
buff.append(getStreamCount()).append(" ice-pwd:")
|
||||||
.append(getLocalPassword());
|
.append(getLocalPassword());
|
||||||
@ -782,11 +787,8 @@ public class Agent
|
|||||||
.append(getTieBreaker());
|
.append(getTieBreaker());
|
||||||
buff.append("):\n");
|
buff.append("):\n");
|
||||||
|
|
||||||
List<IceMediaStream> streams = getStreams();
|
for(IceMediaStream stream : getStreams())
|
||||||
for(IceMediaStream stream : streams)
|
|
||||||
{
|
|
||||||
buff.append(stream.toString()).append("\n");
|
buff.append(stream.toString()).append("\n");
|
||||||
}
|
|
||||||
|
|
||||||
return buff.toString();
|
return buff.toString();
|
||||||
}
|
}
|
||||||
@ -956,8 +958,9 @@ public class Agent
|
|||||||
* @param priority the priority that the remote party assigned to
|
* @param priority the priority that the remote party assigned to
|
||||||
* @param remoteUFrag the user fragment that we should be using when and if
|
* @param remoteUFrag the user fragment that we should be using when and if
|
||||||
* we decide to send a check to <tt>remoteAddress</tt>.
|
* we decide to send a check to <tt>remoteAddress</tt>.
|
||||||
* @param useCandidate indicates whether the incoming check {@link Request}
|
* @param useCandidate indicates whether the incoming check
|
||||||
* contained the USE-CANDIDATE ICE attribute.
|
* {@link org.ice4j.message.Request} contained the USE-CANDIDATE ICE
|
||||||
|
* attribute.
|
||||||
*/
|
*/
|
||||||
protected void incomingCheckReceived(TransportAddress remoteAddress,
|
protected void incomingCheckReceived(TransportAddress remoteAddress,
|
||||||
TransportAddress localAddress,
|
TransportAddress localAddress,
|
||||||
|
|||||||
@ -260,6 +260,7 @@ public abstract class Candidate
|
|||||||
*
|
*
|
||||||
* @throws java.lang.NullPointerException if <tt>obj</tt> is null;
|
* @throws java.lang.NullPointerException if <tt>obj</tt> is null;
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean equals(Object obj)
|
public boolean equals(Object obj)
|
||||||
throws NullPointerException
|
throws NullPointerException
|
||||||
{
|
{
|
||||||
@ -614,10 +615,10 @@ public abstract class Candidate
|
|||||||
*
|
*
|
||||||
* @return a <tt>String</tt> representation of this <tt>Candidate</tt>.
|
* @return a <tt>String</tt> representation of this <tt>Candidate</tt>.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer buff
|
StringBuilder buff = new StringBuilder("candidate: ");
|
||||||
= new StringBuffer("candidate: ");
|
|
||||||
|
|
||||||
buff.append(" ").append(getFoundation());
|
buff.append(" ").append(getFoundation());
|
||||||
buff.append(" ").append(getParentComponent().getComponentID());
|
buff.append(" ").append(getParentComponent().getComponentID());
|
||||||
|
|||||||
@ -45,9 +45,8 @@ public class RemoteCandidate
|
|||||||
long priority)
|
long priority)
|
||||||
{
|
{
|
||||||
super(transportAddress, parentComponent, type);
|
super(transportAddress, parentComponent, type);
|
||||||
super.setFoundation(foundation);
|
setFoundation(foundation);
|
||||||
setPriority(priority);
|
setPriority(priority);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -98,6 +97,7 @@ public class RemoteCandidate
|
|||||||
* as "related" for this <tt>Candidate</tt> or <tt>null</tt> if they didn't
|
* as "related" for this <tt>Candidate</tt> or <tt>null</tt> if they didn't
|
||||||
* include it in SDP.
|
* include it in SDP.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public TransportAddress getRelatedAddress()
|
public TransportAddress getRelatedAddress()
|
||||||
{
|
{
|
||||||
return raddr;
|
return raddr;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user