Constants.initialize(AzureusCoreFactory.getSingleton());
System.out.println(Constants.URL_SUFFIX);
PlatformMessenger.init();
Map parameters = new HashMap();
parameters.put("section-type", "browse");
parameters.put("locale", Locale.getDefault().toString());
System.out.println(SystemTime.getCurrentTime() + ": queueMessage 0");
PlatformMessenger.queueMessage(new PlatformMessage("AZMSG", "config",
"get-browse-sections", parameters, 150),
new PlatformMessengerListener() {
public void replyReceived(PlatformMessage message, String replyType,
Map reply) {
System.out.println(SystemTime.getCurrentTime() + ": replyRecieved "
+ message + ";" + replyType + ";" + reply);
}
public void messageSent(PlatformMessage message) {
System.out.println(SystemTime.getCurrentTime() + ": messageSent"
+ message);
}
});
parameters = new HashMap();
parameters.put("section-type", "minibrowse");
parameters.put("locale", Locale.getDefault().toString());
System.out.println(SystemTime.getCurrentTime() + ": queueMessage 1");
PlatformMessenger.queueMessage(new PlatformMessage("AZMSG", "config",
"get-browse-sections", parameters, 550),
new PlatformMessengerListener() {
public void replyReceived(PlatformMessage message, String replyType,
Map reply) {
System.out.println(SystemTime.getCurrentTime() + ": replyRecieved "
+ message + ";" + replyType + ";" + reply);
}
public void messageSent(PlatformMessage message) {
System.out.println(SystemTime.getCurrentTime() + ": messageSent"
+ message);
}
});
System.out.println(SystemTime.getCurrentTime() + ": queueMessage gr");
PlatformRatingMessenger.getUserRating(
new String[] { PlatformRatingMessenger.RATE_TYPE_CONTENT
}, new String[] { "11"
}, 500, new GetRatingReplyListener() {
public void messageSent() {
System.out.println(SystemTime.getCurrentTime() + ": r messageSent");
}
public void replyReceived(String replyType, PlatformRatingMessenger.GetRatingReply reply) {
System.out.println(SystemTime.getCurrentTime() + ": replyRecieved "
+ ";" + replyType + ";" + reply.getMap().size());
dumpMap(reply.getMap(), "");
}
});
System.out.println(SystemTime.getCurrentTime() + ": queueMessage 3");
PlatformRatingMessenger.setUserRating(
"11", 1, 500, null);