Extension loading

While adding new extensions to the mix, alternative ‘enabler’ for the extension came to mind.

Currently each extension has ‘enable()’ method that adds the extension to the extension registery, from where it is looked at while incoming data is parsed.

Instead of having each extension individually registering to the registery, which might been the best solution in AS2, but perhaps this could be done a bit more efficiently.

While functionality stays the same, registering extensions could be done via helper in XMPPConnection that does the same trick, but accepts several input parametres.







Would be the default minimum needed.

Additional extensions could be added by the application developer when needed.

The method is defined like this:

public function enableExtensions(… exts):void


var len:uint = exts.length;

for (var i:uint = 0; i < len; ++i)


var success:Boolean = ExtensionClassRegistry.register(exts[ i ]);

trace("enableExtensions. i: " + i + ", success: " + success);



How about it?

This is now implemented and used in XIFF.

API break expected while upgrading from 3.0.0 to 3.1.0.

Check also the size of you swf, does it get smaller?