public void makeScope ( IScope scope ) { log . debug ( "makeScope: {}" , scope ) ; String path = scope . getContextPath ( ) ; WebSocketScope wsScope = null ; if ( ! scopes . containsKey ( path ) ) { // add the name to the collection (no '/' prefix) activeRooms . add ( scope . getName ( ) ) ; // new websocket scope for the server scope wsScope = new WebSocketScope ( ) ; wsScope . setPath ( path ) ; wsScope . setScope ( scope ) ; notifyListeners ( WebSocketEvent . SCOPE_CREATED , wsScope ) ; addWebSocketScope ( wsScope ) ; log . debug ( "Use the IWebSocketScopeListener interface to be notified of new scopes" ) ; } else { log . debug ( "Scope already exists: {}" , path ) ; } }
Create a web socket scope from a server IScope . Use the IWebSocketScopeListener interface to configure the created scope .