summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorWes Johnson2013-04-21 18:53:25 (EDT)
committer Andy Piper2013-04-21 18:53:25 (EDT)
commit6d5e1043098d58e286e2ed915fdb17896521e81a (patch)
tree82386deaf0436c4ba3bc52ed0bb6c3f81920d080
parenta807dbb6a15a05fe2fe3061a6a32063307e7d7cc (diff)
downloadorg.eclipse.paho.esf-6d5e1043098d58e286e2ed915fdb17896521e81a.zip
org.eclipse.paho.esf-6d5e1043098d58e286e2ed915fdb17896521e81a.tar.gz
org.eclipse.paho.esf-6d5e1043098d58e286e2ed915fdb17896521e81a.tar.bz2
Updated the Client View to v0.2.1 of the Java client APIv0.2
-rw-r--r--org.eclipse.paho.client.eclipse.view/META-INF/MANIFEST.MF3
-rwxr-xr-xorg.eclipse.paho.client.eclipse.view/src/org/eclipse/paho/client/eclipse/view/Messages.java1
-rw-r--r--org.eclipse.paho.client.eclipse.view/src/org/eclipse/paho/client/eclipse/view/MqttClientView.java18
-rwxr-xr-xorg.eclipse.paho.client.eclipse.view/src/org/eclipse/paho/client/eclipse/view/messages.properties1
4 files changed, 18 insertions, 5 deletions
diff --git a/org.eclipse.paho.client.eclipse.view/META-INF/MANIFEST.MF b/org.eclipse.paho.client.eclipse.view/META-INF/MANIFEST.MF
index 6dad7af..a17b77d 100644
--- a/org.eclipse.paho.client.eclipse.view/META-INF/MANIFEST.MF
+++ b/org.eclipse.paho.client.eclipse.view/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: MQTT Tester View
Bundle-SymbolicName: org.eclipse.paho.client.eclipse.view;singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Activator: org.eclipse.paho.client.eclipse.view.Activator
Bundle-Vendor: ESF
Bundle-ActivationPolicy: lazy
@@ -22,3 +22,4 @@ Import-Package: org.eclipse.jface.action,
org.eclipse.ui.plugin,
org.eclipse.osgi.util,
org.osgi.framework
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/org.eclipse.paho.client.eclipse.view/src/org/eclipse/paho/client/eclipse/view/Messages.java b/org.eclipse.paho.client.eclipse.view/src/org/eclipse/paho/client/eclipse/view/Messages.java
index 96b43e6..590a04d 100755
--- a/org.eclipse.paho.client.eclipse.view/src/org/eclipse/paho/client/eclipse/view/Messages.java
+++ b/org.eclipse.paho.client.eclipse.view/src/org/eclipse/paho/client/eclipse/view/Messages.java
@@ -13,6 +13,7 @@ public class Messages extends NLS {
public static String MqttClientView_105;
public static String MqttClientView_106;
public static String MqttClientView_11;
+ public static String MqttClientView_12;
public static String MqttClientView_110;
public static String MqttClientView_111;
public static String MqttClientView_15;
diff --git a/org.eclipse.paho.client.eclipse.view/src/org/eclipse/paho/client/eclipse/view/MqttClientView.java b/org.eclipse.paho.client.eclipse.view/src/org/eclipse/paho/client/eclipse/view/MqttClientView.java
index b625da9..4bac284 100644
--- a/org.eclipse.paho.client.eclipse.view/src/org/eclipse/paho/client/eclipse/view/MqttClientView.java
+++ b/org.eclipse.paho.client.eclipse.view/src/org/eclipse/paho/client/eclipse/view/MqttClientView.java
@@ -19,6 +19,7 @@ import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
+import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken;
import org.eclipse.paho.client.mqttv3.MqttCallback;
import org.eclipse.paho.client.mqttv3.MqttClient;
import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
@@ -396,6 +397,8 @@ public class MqttClientView extends ViewPart implements MqttCallback {
e.printStackTrace();
} catch (MqttException e) {
e.printStackTrace();
+ } catch (IllegalArgumentException e) {
+ out(Messages.MqttClientView_12);
}
}
}
@@ -459,11 +462,12 @@ public class MqttClientView extends ViewPart implements MqttCallback {
connected = true;
syncOut(getDate() + Messages.MqttClientView_50 + clientId);
}
-
+
+ @Override
/**
* Logs a message that has arrived from the broker
*/
- public void messageArrived(MqttTopic topic, MqttMessage message)
+ public void messageArrived(String topic, MqttMessage message)
throws Exception {
syncOut(getDate() + Messages.MqttClientView_51);
syncOut(Messages.MqttClientView_52 + topic + "\""); //$NON-NLS-2$
@@ -524,7 +528,7 @@ public class MqttClientView extends ViewPart implements MqttCallback {
private Control getConnectionControl(TabFolder tabFolder) {
Composite composite = new Composite(tabFolder, SWT.NONE);
composite.setLayout(new FillLayout(SWT.VERTICAL));
-
+
// Connection group
connectionGroup = new Group(composite, SWT.NONE);
connectionGroup.setLayout(new GridLayout(2, false));
@@ -835,5 +839,11 @@ public class MqttClientView extends ViewPart implements MqttCallback {
is.close();
return bytes;
- }
+ }
+
+ @Override
+ public void deliveryComplete(IMqttDeliveryToken token) {
+ // TODO Auto-generated method stub
+
+ }
}
diff --git a/org.eclipse.paho.client.eclipse.view/src/org/eclipse/paho/client/eclipse/view/messages.properties b/org.eclipse.paho.client.eclipse.view/src/org/eclipse/paho/client/eclipse/view/messages.properties
index cd97912..1e26a27 100755
--- a/org.eclipse.paho.client.eclipse.view/src/org/eclipse/paho/client/eclipse/view/messages.properties
+++ b/org.eclipse.paho.client.eclipse.view/src/org/eclipse/paho/client/eclipse/view/messages.properties
@@ -9,6 +9,7 @@ MqttClientView_106=QoS:
MqttClientView_11=Subscribe and unsubscribe to topics
MqttClientView_110=Subscribe
MqttClientView_111=Unsubscribe
+MqttClientView_12=Error publishing: Please enter a valid topic to publish on.
MqttClientView_15=Error connecting to
MqttClientView_16=, please enter a valid client ID.
MqttClientView_17=Failed to connect to broker: