aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-12-07 12:37:43 +0300
committerGravatar Vitaly Takmazov2016-12-07 12:37:43 +0300
commitb2a65a6b63e8691b0101f4652705fab79dc26d99 (patch)
treeaca4e771761db78063dc88609f2b7426add27ae2 /juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
parentdb786ce4055467c1214725b18ec30f70d704d427 (diff)
juick-xmpp: refactoring
Diffstat (limited to 'juick-xmpp/src/main/java/com/juick/components/XMPPServer.java')
-rw-r--r--juick-xmpp/src/main/java/com/juick/components/XMPPServer.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java b/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
index c51810a5..caa4c200 100644
--- a/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
+++ b/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
@@ -209,7 +209,7 @@ public class XMPPServer implements AutoCloseable {
try {
connOut.sendStanza(xml);
} catch (IOException e) {
- logger.warn("STREAM TO {} {} ERROR: {}",
+ logger.warn("stream to {} {} error: {}",
connOut.to, connOut.streamID, e);
}
return;
@@ -256,4 +256,14 @@ public class XMPPServer implements AutoCloseable {
return outCache;
}
+ public void startDialback(String from, String streamId, String dbKey) throws Exception {
+ ConnectionOut c = getConnectionOut(from, false);
+ if (c != null) {
+ c.sendDialbackVerify(streamId, dbKey);
+ } else {
+ c = new ConnectionOut(this, from, streamId, dbKey);
+ service.submit(c);
+ }
+ }
+
}