forked from External/mage
[app-wiring-refactor]: Remove static initialisation
- Remove all enum static managers - Introduce interfaces for the managers - Define new application wiring class (`ManagerFactory`) - Externalise the configuration
This commit is contained in:
parent
cf3dd2d94c
commit
d0c2135e17
48 changed files with 1385 additions and 911 deletions
|
|
@ -1,11 +1,10 @@
|
|||
|
||||
|
||||
package mage.server;
|
||||
|
||||
import mage.server.managers.IChatManager;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public abstract class RoomImpl implements Room {
|
||||
|
|
@ -13,9 +12,9 @@ public abstract class RoomImpl implements Room {
|
|||
private final UUID chatId;
|
||||
private final UUID roomId;
|
||||
|
||||
public RoomImpl() {
|
||||
public RoomImpl(IChatManager chatManager) {
|
||||
roomId = UUID.randomUUID();
|
||||
chatId = ChatManager.instance.createChatSession("Room " + roomId);
|
||||
chatId = chatManager.createChatSession("Room " + roomId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -35,5 +34,4 @@ public abstract class RoomImpl implements Room {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue