ia = InetAddress.getByName(cpe.getIP());
} catch (UnknownHostException uhe) {
continue;
}
TransportAddress relatedAddr = null;
if (cpe.getRelAddr() != null && cpe.getRelPort() != -1) {
relatedAddr = new TransportAddress(cpe.getRelAddr(), cpe.getRelPort(), Transport.parse(cpe.getProtocol().toLowerCase()));
}
Component component = ims.getComponent(cpe.getComponent());
if (component != null) {
// we should always be able to find this if there is one b/c of the sorting we did.
RemoteCandidate relatedCandidate = relatedAddr != null ? component.findRemoteCandidate(relatedAddr) : null;
TransportAddress ta = new TransportAddress(ia, cpe.getPort(), Transport.parse(cpe.getProtocol().toLowerCase()));
RemoteCandidate rc = new RemoteCandidate( ta,
component,
convertType(cpe.getType()),
Integer.toString(cpe.getFoundation()),
cpe.getPriority(),