Added skeleton for client side of subscription

This commit is contained in:
selva.andre
2012-07-27 00:17:43 +02:00
parent 397aea8e6a
commit b32bbe4629
7 changed files with 114 additions and 3 deletions
@@ -3,6 +3,7 @@ package org.dna.mqtt.moquette.server;
import java.io.IOException;
import org.apache.mina.core.service.IoConnector;
import org.dna.mqtt.moquette.client.Client;
import org.dna.mqtt.moquette.client.IPublishCallback;
import org.junit.Test;
/**
@@ -24,7 +25,12 @@ public class ServerIntegrationTest {
client.connect();
client.publish("/topic", "Test my payload".getBytes());
//TODO client.subscribe("/topic", callback)
client.subscribe("/topic", new IPublishCallback() {
public void published(String topic, byte[] message) {
throw new UnsupportedOperationException("Not supported yet.");
}
});
client.close();
}