summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src
diff options
context:
space:
mode:
authorAndreas Abraham <andreas.abraham@egiz.gv.at>2019-01-17 10:26:17 +0100
committerAndreas Abraham <andreas.abraham@egiz.gv.at>2019-01-17 10:26:17 +0100
commitad18f4df9d4aa4cbe2458080e015814118c0d260 (patch)
treee577e0f65afefb75537ea8836e1fbaa3385f44e6 /pdf-over-gui/src
parent2b144d7321896b4379716b1cd2cfc97748d2ce37 (diff)
downloadpdf-over-ad18f4df9d4aa4cbe2458080e015814118c0d260.tar.gz
pdf-over-ad18f4df9d4aa4cbe2458080e015814118c0d260.tar.bz2
pdf-over-ad18f4df9d4aa4cbe2458080e015814118c0d260.zip
calling the right handler
Diffstat (limited to 'pdf-over-gui/src')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java
index 7941a8ec..e739e7dd 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java
@@ -15,6 +15,9 @@
*/
package at.asit.pdfover.gui.bku;
+import java.net.URL;
+
+import org.apache.commons.httpclient.util.HttpURLConnection;
// Imports
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -88,10 +91,18 @@ public class MobileBKUConnector implements BkuSlConnector {
try {
String responseData = handler.postCredentials();
- // Now we have received some data lets check it:
- log.trace("Response from mobile BKU: " + responseData); //$NON-NLS-1$
-
- handler.handleCredentialsResponse(responseData);
+ if (responseData.contains("page_undecided")) { //$NON-NLS-1$
+
+ // handle polling
+ handler.handlePolling(responseData);
+
+ } else {
+
+ // Now we have received some data lets check it:
+ log.trace("Response from mobile BKU: " + responseData); //$NON-NLS-1$
+ handler.handleCredentialsResponse(responseData);
+ }
+
} catch (Exception ex) {
log.error("Error in PostCredentialsThread", ex); //$NON-NLS-1$
this.state.setThreadException(ex);