This commit is contained in:
地平线
2015-06-27 10:27:01 +08:00
parent 75383b8515
commit 1fb1d17f52
2 changed files with 8 additions and 0 deletions

View File

@@ -114,6 +114,10 @@ public abstract class WebSocket {
protected final WebSocketGroup getWebSocketGroup(long groupid) {
return engine.getWebSocketGroup(groupid);
}
protected final Collection<WebSocketGroup> getWebSocketGroups() {
return engine.getWebSocketGroups();
}
//-------------------------------------------------------------------
/**

View File

@@ -49,6 +49,10 @@ public final class WebSocketEngine {
if (group.isEmpty()) containers.remove(socket.groupid);
}
Collection<WebSocketGroup> getWebSocketGroups() {
return containers.values();
}
public WebSocketGroup getWebSocketGroup(Serializable groupid) {
return containers.get(groupid);
}