public class Meshms {
static void meshms_list_conversations(SubscriberId sid) throws ServalDInterfaceException, IOException, InterruptedException
{
ServalDClient client = new ServerControl().getRestfulClient();
MeshMSConversationList list = null;
try {
list = client.meshmsListConversations(sid);
MeshMSConversation conv;
while ((conv = list.nextConversation()) != null) {
System.out.println(
"_id=" + conv._id +
", my_sid=" + conv.mySid +
", their_sid=" + conv.theirSid +
", read=" + conv.isRead +
", last_message=" + conv.lastMessageOffset +
", read_offset=" + conv.readOffset
);
}
}
catch (MeshMSException e) {
System.out.println(e.toString());
}
finally {
if (list != null)
list.close();
}
System.exit(0);
}