@@ -23,14 +23,6 @@ public class ModuleManager {
2323 /* TODO : comment */
2424 static private var allModules: Vector .< ModuleBase> = new Vector .< ModuleBase> ();
2525
26- /* TODO : comment */
27- // EXPERIMENTAL
28- //static private var remoteHandlerRegistry:Dictionary = new Dictionary();
29-
30- /* pending handrels stored by module name */
31- // EXPERIMENTAL
32- //static private var pendingRemoteHandlers:Dictionary = new Dictionary(); /* of Vector.<PendingRemoteHandler> by String */
33-
3426 /** CONSTRUCTOR */
3527 public function ModuleManager () {
3628 throw Error ("ModuleFactory is static framework class for internal use. Not meant to be instantiated." );
@@ -104,16 +96,6 @@ public class ModuleManager {
10496 } else {
10597 throw Error ("Module with moduleName:" + moduleName + " doesn't exist." );
10698 }
107- // EXPERIMENTAL
108- //if (remoteHandlerRegistry[moduleName]) {
109- //for each (var remotes:Dictionary in remoteHandlerRegistry[moduleName]) {
110- //for each (var handlers:Vector.<HandlerVO>in remotes) {
111- //for (var i:int = 0; i < handlers.length; i++) {
112- //handlers[i].handler = null;
113- //}
114- //}
115- //}
116- //}
11799 }
118100
119101 /**
@@ -129,76 +111,6 @@ public class ModuleManager {
129111 }
130112 }
131113
132- /*
133- * TODO : COMMENT
134- * @param type
135- * @param handler
136- * @param remoteModuleName
137- */
138- //
139- /*
140- // EXPERIMENTAL
141- static pureLegsCore function addRemoteHandler(type:String, handler:Function, handlerModuleName:String, remoteModuleName:String, commandClass:Class = null):HandlerVO {
142-
143- trace("ModuleManager.addRemoteHandler > type : " + type + ", handler : " + handler + ", remoteModuleName : " + remoteModuleName + ", commandClass : " + commandClass);
144- use namespace pureLegsCore;
145- if (!remoteHandlerRegistry[handlerModuleName]) {
146- remoteHandlerRegistry[handlerModuleName] = new Dictionary();
147- }
148- if (!remoteHandlerRegistry[handlerModuleName][remoteModuleName]) {
149- remoteHandlerRegistry[handlerModuleName][remoteModuleName] = new Dictionary();
150- }
151- if (!remoteHandlerRegistry[handlerModuleName][remoteModuleName][type]) {
152- remoteHandlerRegistry[handlerModuleName][remoteModuleName][type] = new Vector.<HandlerVO>();
153- }
154-
155- //
156- var handlerVo:HandlerVO;
157- if (commandClass) {
158- if (moduleRegistry[remoteModuleName]) {
159- handlerVo = moduleRegistry[remoteModuleName].messenger.addCommandHandler(type, handler, commandClass);
160- } else {
161- if (!pendingRemoteHandlers[remoteModuleName]) {
162- pendingRemoteHandlers[remoteModuleName] = new Vector.<PendingRemoteHandler>();
163- }
164- pendingRemoteHandlers[remoteModuleName].push(new PendingRemoteHandler(type, handler, handlerModuleName, remoteModuleName, commandClass));
165- }
166- } else {
167- if (moduleRegistry[remoteModuleName]) {
168- use namespace pureLegsCore;
169- handlerVo = moduleRegistry[remoteModuleName].messenger.addHandler(type, handler);
170- } else {
171- if (!pendingRemoteHandlers[remoteModuleName]) {
172- pendingRemoteHandlers[remoteModuleName] = new Vector.<PendingRemoteHandler>();
173- }
174- pendingRemoteHandlers[remoteModuleName].push(new PendingRemoteHandler(type, handler, handlerModuleName, remoteModuleName, commandClass));
175- }
176- }
177- //
178- if (handlerVo) {
179- handlerVo.remoteModule = handlerModuleName;
180- remoteHandlerRegistry[handlerModuleName][remoteModuleName][type].push(handlerVo);
181- }
182- return handlerVo;
183- }
184- //*/
185-
186- // EXPERIMENTAL
187- /*
188- static pureLegsCore function removeRemoteHandler(type:String, handler:Function, handlerModuleName:String, remoteModuleName:String, commandClass:Class = null):void {
189- if (commandClass) {
190- if (moduleRegistry[remoteModuleName]) {
191- //moduleRegistry[remoteModuleName].messenger.(type, handler, commandClass);
192- }
193- } else {
194- if (moduleRegistry[remoteModuleName]) {
195- use namespace pureLegsCore;
196- moduleRegistry[remoteModuleName].messenger.removeHandler(type, handler);
197- }
198- }
199- }
200- //*/
201-
202114 //----------------------------------
203115 // DEBUG
204116 //----------------------------------
@@ -281,21 +193,4 @@ public class ModuleManager {
281193 }
282194
283195}
284- } /*
285- class PendingRemoteHandler {
286-
287- public var type:String;
288- public var handler:Function;
289- public var handlerModuleName:String;
290- public var remoteModuleName:String;
291- public var commandClass:Object;
292-
293- public function PendingRemoteHandler(type:String, handler:Function, handlerModuleName:String, remoteModuleName:String, commandClass:Class) {
294- this.type = type;
295- this.handler = handler;
296- this.handlerModuleName = handlerModuleName;
297- this.remoteModuleName = remoteModuleName;
298- this.commandClass = commandClass;
299- }
300- }
301- //*/
196+ }
0 commit comments