#NEWLINE# def setUnjellyableFactoryForClass( classname , copyFactory ) : #NEWLINE# #INDENT# "\n    Set the factory to construct a remote instance of a type::\n\n      jellier.setUnjellyableFactoryForClass('module.package.Class', MyFactory)\n\n    Call this at the module level immediately after its class definition.\n    C{copyFactory} should return an instance or subclass of\n    L{RemoteCopy<pb.RemoteCopy>}.\n\n    Similar to L{setUnjellyableForClass} except it uses a factory instead\n    of creating an instance.\n    " #NEWLINE# global unjellyableFactoryRegistry #NEWLINE# classname = _maybeClass ( classname ) #NEWLINE# unjellyableFactoryRegistry [ classname ] = copyFactory #NEWLINE# globalSecurity . allowTypes ( classname )