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