aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/xmpp/s2s/Shutdown.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-01-26 21:43:38 +0300
committerGravatar Vitaly Takmazov2016-01-26 21:43:38 +0300
commit58fb4a6394cb19ee04e65d0e921cdf0ae6fdb6e3 (patch)
tree63e50cebe6e2fb900cc3297f5e2af09a7169fc95 /src/main/java/com/juick/xmpp/s2s/Shutdown.java
parente5dba294763f40a5e3fd8e997d4ea3f507142924 (diff)
s2s: logging
Diffstat (limited to 'src/main/java/com/juick/xmpp/s2s/Shutdown.java')
-rw-r--r--src/main/java/com/juick/xmpp/s2s/Shutdown.java45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/main/java/com/juick/xmpp/s2s/Shutdown.java b/src/main/java/com/juick/xmpp/s2s/Shutdown.java
deleted file mode 100644
index fb3543f8..00000000
--- a/src/main/java/com/juick/xmpp/s2s/Shutdown.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.juick.xmpp.s2s;
-
-import java.sql.SQLException;
-import java.util.Iterator;
-
-/**
- *
- * @author ugnich
- */
-public class Shutdown extends Thread {
-
- @Override
- public void run() {
- System.out.println("SHUTTING DOWN");
-
- synchronized (XMPPComponent.outConnections) {
- for (Iterator<ConnectionOut> i = XMPPComponent.outConnections.iterator(); i.hasNext();) {
- ConnectionOut c = i.next();
- c.closeConnection();
- i.remove();
- }
- }
-
- synchronized (XMPPComponent.inConnections) {
- for (Iterator<ConnectionIn> i = XMPPComponent.inConnections.iterator(); i.hasNext();) {
- ConnectionIn c = i.next();
- c.closeConnection();
- i.remove();
- }
- }
-
- XMPPComponent.connRouter.closeConnection();
-
- synchronized (XMPPComponent.sqlSync) {
- if (XMPPComponent.sql != null) {
- try {
- XMPPComponent.sql.close();
- XMPPComponent.sql = null;
- } catch (SQLException e) {
- System.err.println("SQL ERROR: " + e);
- }
- }
- }
- }
-}