|
|
|
@ -1,8 +1,11 @@
@@ -1,8 +1,11 @@
|
|
|
|
|
package ru.molokoin; |
|
|
|
|
|
|
|
|
|
import java.util.Queue; |
|
|
|
|
import java.util.concurrent.ArrayBlockingQueue; |
|
|
|
|
|
|
|
|
|
public class ExchangeServer { |
|
|
|
|
private static ServerLauncher launch = new ServerLauncher(); |
|
|
|
|
public static Thread server = new Thread(launch); |
|
|
|
|
private static ServerLauncher launch; |
|
|
|
|
public static Thread server; |
|
|
|
|
|
|
|
|
|
//Запуск сервера
|
|
|
|
|
public void enable(ExchangeServer server){ |
|
|
|
@ -13,6 +16,10 @@ public class ExchangeServer {
@@ -13,6 +16,10 @@ public class ExchangeServer {
|
|
|
|
|
//
|
|
|
|
|
} |
|
|
|
|
public static void main(String[] args) { |
|
|
|
|
Queue<Connection> connectionQueue = (Queue<Connection>)new ArrayBlockingQueue(1024); |
|
|
|
|
launch = new ServerLauncher(8081, connectionQueue); |
|
|
|
|
server = new Thread(launch); |
|
|
|
|
server.setName("ServerLauncherThread"); |
|
|
|
|
server.start(); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|