Сообщения, доставка сообщений, фикс хэндшейков, буферная зона (для синхронмзации)
This commit is contained in:
@@ -7,6 +7,7 @@ import com.rosetta.im.executors.Executor0Handshake;
|
||||
import com.rosetta.im.executors.Executor1UserInfo;
|
||||
import com.rosetta.im.executors.Executor3Search;
|
||||
import com.rosetta.im.executors.Executor4OnlineState;
|
||||
import com.rosetta.im.executors.Executor6Message;
|
||||
import com.rosetta.im.listeners.HandshakeCompleteListener;
|
||||
import com.rosetta.im.listeners.OnlineStatusDisconnectListener;
|
||||
import com.rosetta.im.listeners.OnlineStatusHandshakeCompleteListener;
|
||||
@@ -20,6 +21,8 @@ import com.rosetta.im.packet.Packet2Result;
|
||||
import com.rosetta.im.packet.Packet3Search;
|
||||
import com.rosetta.im.packet.Packet4OnlineSubscribe;
|
||||
import com.rosetta.im.packet.Packet5OnlineState;
|
||||
import com.rosetta.im.packet.Packet6Message;
|
||||
import com.rosetta.im.packet.Packet8Delivery;
|
||||
|
||||
import io.orprotocol.Server;
|
||||
import io.orprotocol.Settings;
|
||||
@@ -28,6 +31,9 @@ import io.orprotocol.packet.PacketManager;
|
||||
/**
|
||||
* Boot отвечает за инициализацию всех пакетов и их обработчиков,
|
||||
* а так же событий приложения. Этот Boot отвечает за приложение, а не за протокол.
|
||||
*
|
||||
* Нужен он для того, чтобы все части приложения получали одинаковые ссылки на глобальные обьекты приложения, такие как менеджер пакетов,
|
||||
* менеджер событий, менеджер клиентов и так далее
|
||||
*/
|
||||
public class Boot {
|
||||
|
||||
@@ -111,13 +117,16 @@ public class Boot {
|
||||
this.packetManager.registerPacket(3, Packet3Search.class);
|
||||
this.packetManager.registerPacket(4, Packet4OnlineSubscribe.class);
|
||||
this.packetManager.registerPacket(5, Packet5OnlineState.class);
|
||||
this.packetManager.registerPacket(6, Packet6Message.class);
|
||||
this.packetManager.registerPacket(8, Packet8Delivery.class);
|
||||
}
|
||||
|
||||
private void registerAllExecutors() {
|
||||
this.packetManager.registerExecutor(0, new Executor0Handshake(this.eventManager));
|
||||
this.packetManager.registerExecutor(1, new Executor1UserInfo());
|
||||
this.packetManager.registerExecutor(3, new Executor3Search(this.clientManager));
|
||||
this.packetManager.registerExecutor(4, new Executor4OnlineState(this.onlineManager));
|
||||
this.packetManager.registerExecutor(4, new Executor4OnlineState(this.onlineManager, this.clientManager));
|
||||
this.packetManager.registerExecutor(6, new Executor6Message(this.clientManager, this.packetManager));
|
||||
}
|
||||
|
||||
private void printBootMessage() {
|
||||
|
||||
Reference in New Issue
Block a user