"vid",
COConfigurationManager.getStringParameter("ID"),
"source-ref",
sourceRef
};
PlatformMessage message = new PlatformMessage("AZMSG", LISTENER_ID,
"login", params, maxDelayMS);
message.setContentNetworkID(contentNetworkID);
PlatformMessengerListener listener = new PlatformMessengerListener() {
public void replyReceived(PlatformMessage message, String replyType,
Map reply) {
if (reply == null) {
return;
}
boolean allowMulti = MapUtils.getMapBoolean(reply, "allow-multi-rpc",
PlatformMessenger.getAllowMulti());
PlatformMessenger.setAllowMulti(allowMulti);
try {
List listURLs = (List) MapUtils.getMapObject(reply, "url-whitelist",
null, List.class);
if (listURLs != null) {
for (int i = 0; i < listURLs.size(); i++) {
String string = (String) listURLs.get(i);
UrlFilter.getInstance().addUrlWhitelist(string);
}
}
} catch (Exception e) {
Debug.out(e);
}
try {
List listURLs = (List) MapUtils.getMapObject(reply, "url-blacklist",
null, List.class);
if (listURLs != null) {
for (int i = 0; i < listURLs.size(); i++) {
String string = (String) listURLs.get(i);
UrlFilter.getInstance().addUrlBlacklist(string);
}
}
} catch (Exception e) {
Debug.out(e);
}
try {
List listDomains = (List) MapUtils.getMapObject(reply, "tracker-domains",
null, List.class);
if (listDomains != null) {
for (int i = 0; i < listDomains.size(); i++) {
String s = (String) listDomains.get(i);
PlatformTorrentUtils.addPlatformHost(s);
PlatformMessenger.debug("v3.login: got tracker domain of " + s);
}
}
} catch (Exception e) {
Debug.out(e);
}
try {
List list = MapUtils.getMapList(reply, "external-links", Collections.EMPTY_LIST);
externalLinks.addAll(list);
} catch (Exception e) {
Debug.out(e);
}
if (message.getContentNetworkID() != ConstantsVuze.getDefaultContentNetwork().getID()) {
return;
}
try {
sendStats = MapUtils.getMapBoolean(reply, "send-stats", false);