Fixes the Ant target rebuild, warnings.

This commit is contained in:
lubomir.marinov 2014-01-03 12:13:52 +00:00
parent 4c132cccd6
commit d5c2fa6c8d
7 changed files with 56 additions and 41 deletions

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/jain-sdp.jar"/>
<classpathentry kind="lib" path="lib/junit.jar"/>

View File

@ -26,8 +26,7 @@ import org.ice4j.*;
* @author Emil Ivov
* @author Lyubomir Marinov
*/
public abstract class Candidate
<T extends Candidate<?>>
public abstract class Candidate<T extends Candidate<?>>
implements Comparable<T>
{
/**

View File

@ -245,14 +245,15 @@ public class Ice
Component remoteComponent)
{
List<LocalCandidate> remoteCandidates
= remoteComponent.getLocalCandidates();
= remoteComponent.getLocalCandidates();
localComponent.setDefaultRemoteCandidate(
remoteComponent.getDefaultCandidate());
remoteComponent.getDefaultCandidate());
for(Candidate rCand : remoteCandidates)
for(Candidate<?> rCand : remoteCandidates)
{
localComponent.addRemoteCandidate(new RemoteCandidate(
localComponent.addRemoteCandidate(
new RemoteCandidate(
rCand.getTransportAddress(),
localComponent,
rCand.getType(),

View File

@ -9,13 +9,13 @@ package test;
import java.beans.*;
import java.io.*;
import java.net.*;
import java.util.*;
import java.util.logging.*;
import org.ice4j.*;
import org.ice4j.ice.*;
import org.ice4j.ice.harvest.*;
import org.ice4j.security.*;
import org.ice4j.pseudotcp.*;
import org.ice4j.security.*;
/**
* Sample program which first uses ICE to discover UDP connectivity. After that
@ -143,13 +143,16 @@ public class IcePseudoTcp
Object iceProcessingState = evt.getNewValue();
logger.log(Level.INFO,
"Local agent entered the " + iceProcessingState + " state.");
logger.log(
Level.INFO,
"Local agent entered the " + iceProcessingState
+ " state.");
if (iceProcessingState == IceProcessingState.COMPLETED)
{
logger.log(Level.INFO,
"Local - Total ICE processing time: "
+ (processingEndTime - startTime) + "ms");
logger.log(
Level.INFO,
"Local - Total ICE processing time: "
+ (processingEndTime - startTime) + "ms");
Agent agent = (Agent) evt.getSource();
logger.log(Level.INFO, "Local: Create pseudo tcp stream");
IceMediaStream dataStream = agent.getStream("data");
@ -157,8 +160,10 @@ public class IcePseudoTcp
CandidatePair selectedPair = udpComponent.getSelectedPair();
if (selectedPair != null)
{
LocalCandidate localCandidate = selectedPair.getLocalCandidate();
Candidate remoteCandidate = selectedPair.getRemoteCandidate();
LocalCandidate localCandidate
= selectedPair.getLocalCandidate();
Candidate<?> remoteCandidate
= selectedPair.getRemoteCandidate();
logger.log(Level.INFO, "Local: " + localCandidate);
logger.log(Level.INFO, "Remote: " + remoteCandidate);
try
@ -175,7 +180,9 @@ public class IcePseudoTcp
}
else
{
logger.log(Level.INFO, "Failed to select any candidate pair");
logger.log(
Level.INFO,
"Failed to select any candidate pair");
}
}
else
@ -188,8 +195,9 @@ public class IcePseudoTcp
* that Agent instances are to be explicitly prepared for
* garbage collection.
*/
if (localJob != null
&& iceProcessingState == IceProcessingState.TERMINATED)
if ((localJob != null)
&& (iceProcessingState
== IceProcessingState.TERMINATED))
{
localJob.start();
}
@ -217,8 +225,10 @@ public class IcePseudoTcp
Object iceProcessingState = evt.getNewValue();
logger.log(Level.INFO,
"Remote agent entered the " + iceProcessingState + " state.");
logger.log(
Level.INFO,
"Remote agent entered the " + iceProcessingState
+ " state.");
if (iceProcessingState == IceProcessingState.COMPLETED)
{
logger.log(Level.INFO,
@ -232,8 +242,10 @@ public class IcePseudoTcp
CandidatePair usedPair = udpComponent.getSelectedPair();
if (usedPair != null)
{
LocalCandidate localCandidate = usedPair.getLocalCandidate();
Candidate remoteCandidate = usedPair.getRemoteCandidate();
LocalCandidate localCandidate
= usedPair.getLocalCandidate();
Candidate<?> remoteCandidate
= usedPair.getRemoteCandidate();
logger.log(Level.INFO,
"Remote: Local address " + localCandidate);
logger.log(Level.INFO,
@ -267,8 +279,9 @@ public class IcePseudoTcp
* that Agent instances are to be explicitly prepared for
* garbage collection.
*/
if (remoteJob != null
&& iceProcessingState == IceProcessingState.TERMINATED)
if ((remoteJob != null)
&& (iceProcessingState
== IceProcessingState.TERMINATED))
{
remoteJob.start();
}
@ -294,8 +307,10 @@ public class IcePseudoTcp
Agent remotePeer =
createAgent(remotePort);
localAgent.addStateChangeListener(new IcePseudoTcp.LocalIceProcessingListener());
remotePeer.addStateChangeListener(new IcePseudoTcp.RemoteIceProcessingListener());
localAgent.addStateChangeListener(
new IcePseudoTcp.LocalIceProcessingListener());
remotePeer.addStateChangeListener(
new IcePseudoTcp.RemoteIceProcessingListener());
//let them fight ... fights forge character.
localAgent.setControlling(true);
@ -450,5 +465,4 @@ public class IcePseudoTcp
logger.log(Level.FINEST, "Remote pseudotcp worker finished");
}
}
}

View File

@ -125,13 +125,13 @@ public class SdpUtils
Component rtpComponent = stream.getComponent(Component.RTP);
Component rtcpComponent = stream.getComponent(Component.RTCP);
Candidate defaultRtpCandidate
Candidate<?> defaultRtpCandidate
= rtpComponent.findRemoteCandidate(defaultRtpAddress);
rtpComponent.setDefaultRemoteCandidate(defaultRtpCandidate);
if(rtcpComponent != null)
{
Candidate defaultRtcpCandidate
Candidate<?> defaultRtcpCandidate
= rtcpComponent.findRemoteCandidate(defaultRtcpAddress);
rtcpComponent.setDefaultRemoteCandidate(defaultRtcpCandidate);
}

View File

@ -6,15 +6,15 @@
*/
package test;
import java.util.*;
import java.util.logging.*;
import javax.sdp.*;
import org.ice4j.ice.*;
import org.ice4j.ice.harvest.*;
import org.ice4j.ice.sdp.*;
import javax.sdp.*;
import java.io.*;
import java.util.*;
import java.util.logging.*;
/**
* An example of using trickle ICE.
* <p>

View File

@ -20,9 +20,9 @@ public class Signalling
/**
* The socket where we send and receive signalling
*/
private Socket signallingSocket = null;
private Socket signallingSocket;
private SignallingCallback signallingCallback = null;
private SignallingCallback signallingCallback;
/**
* Creates a signalling instance over the specified socket.
@ -49,12 +49,12 @@ public class Signalling
* socket stuff).
*/
public static Signalling createServerSignalling(
InetSocketAddress socketAddress,
SignallingCallback signallingCallback)
InetSocketAddress socketAddress,
SignallingCallback signallingCallback)
throws Throwable
{
ServerSocket serverSocket = new ServerSocket(socketAddress);
Signalling signalling = new Signalling(socketAddress, signallingCallback);
// ServerSocket serverSocket = new ServerSocket(socketAddress);
// Signalling signalling = new Signalling(socketAddress, signallingCallback);
return null;
}
}