Skip to content

Instantly share code, notes, and snippets.

@cupuyc
Created September 23, 2011 09:04
Show Gist options
  • Save cupuyc/1236991 to your computer and use it in GitHub Desktop.
Save cupuyc/1236991 to your computer and use it in GitHub Desktop.
From scriptlib
Client.prototype.__resolve = function(ctype) {
// Check if a component class corresponding to ctype exists if so
// return a new facade factory for ctype components
if ( gFrameworkFC.components[ctype] != null ) {
info("Create new factory for type:" + ctype);
return this[ctype] = new FCFactory(this, ctype);
}
// else do nothing, forcing a NetConnection.Call.Failed
}
/**
* A factory that creates named components of appropriate type
*/
FCFactory = function(client, ctype) {
this.client = client;
this.ctype = ctype;
}
@cupuyc
Copy link
Author

cupuyc commented Sep 23, 2011

This is repeated logs for each connected client. So I guess each client ref is stored in "gFrameworkFC.components"
2011-09-23 10:15:58 5892 (s)2641173 INFO: Create new factory for type:Chat -
2011-09-23 10:15:58 5892 (s)2641173 INFO: Create new factory for type:UserList -
2011-09-23 10:15:58 5892 (s)2641173 INFO: Create new factory for type:Conference -
2011-09-23 10:15:58 5892 (s)2641173 INFO: Create new factory for type:ContentShare -
2011-09-23 10:15:58 5892 (s)2641173 INFO: Create new factory for type:Notes -
2011-09-23 10:15:58 5892 (s)2641173 INFO: Create new factory for type:QuestionAnswer -
2011-09-23 10:15:58 5892 (s)2641173 INFO: Create new factory for type:Poll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment