js/ServiceFactory.js
function (smd, plugins) {
                var reader = this.newReader(smd),
                    provider = this.config.provider,
                    matcher = this.pluginMatcher,
                    sentPlugins = plugins || [],
                    mixinPlugins = [],
                    pertinentMethods,
                    service;

                mixinPlugins = mixinPlugins.concat(
                    this.pluginMatcher.listForServiceOnly(util.serviceName(reader.getSchemaId()),
                        reader.getMethodNames(), "mixin", this.config.plugins),
                    this.pluginMatcher.listForServiceOnly(util.serviceName(reader.getSchemaId()),
                        reader.getMethodNames(), "mixin", sentPlugins)
                );

                service = new Service(reader, provider, this.config.plugins, sentPlugins);

                logger.debug("Mixin plugins for " + service.name, mixinPlugins);

                util.executePluginChain(mixinPlugins, function (plugin) {
                    // get method names to pass to mixin plugin.
                    pertinentMethods = matcher.matchingMethodNames(service.name, reader.getMethodNames(), plugin);
                    plugin.fn.call(plugin.scope || plugin, service, pertinentMethods);
                });

                return service;

            }
function (smd, plugins) {
                var reader = this.newReader(smd),
                    provider = this.config.provider,
                    matcher = this.pluginMatcher,
                    sentPlugins = plugins || [],
                    mixinPlugins = [],
                    pertinentMethods,
                    service;

                mixinPlugins = mixinPlugins.concat(
                    this.pluginMatcher.listForServiceOnly(util.serviceName(reader.getSchemaId()),
                        reader.getMethodNames(), "mixin", this.config.plugins),
                    this.pluginMatcher.listForServiceOnly(util.serviceName(reader.getSchemaId()),
                        reader.getMethodNames(), "mixin", sentPlugins)
                );

                service = new Service(reader, provider, this.config.plugins, sentPlugins);

                logger.debug("Mixin plugins for " + service.name, mixinPlugins);

                util.executePluginChain(mixinPlugins, function (plugin) {
                    // get method names to pass to mixin plugin.
                    pertinentMethods = matcher.matchingMethodNames(service.name, reader.getMethodNames(), plugin);
                    plugin.fn.call(plugin.scope || plugin, service, pertinentMethods);
                });

                return service;

            }
function ( smd , plugins ) { var reader = this . newReader ( smd ) , provider = this . config . provider , matcher = this . pluginMatcher , sentPlugins = plugins || [ ] , mixinPlugins = [ ] , pertinentMethods , service ; mixinPlugins = mixinPlugins . concat ( this . pluginMatcher . listForServiceOnly ( util . serviceName ( reader . getSchemaId ( ) ) , reader . getMethodNames ( ) , "mixin" , this . config . plugins ) , this . pluginMatcher . listForServiceOnly ( util . serviceName ( reader . getSchemaId ( ) ) , reader . getMethodNames ( ) , "mixin" , sentPlugins ) ) ; service = new Service ( reader , provider , this . config . plugins , sentPlugins ) ; logger . debug ( "Mixin plugins for " + service . name , mixinPlugins ) ; util . executePluginChain ( mixinPlugins , function ( plugin ) { // get method names to pass to mixin plugin. pertinentMethods = matcher . matchingMethodNames ( service . name , reader . getMethodNames ( ) , plugin ) ; plugin . fn . call ( plugin . scope || plugin , service , pertinentMethods ) ; } ) ; return service ; }
Returns an instance of a Service using its SMD.

@param smd - the SMD instance to use for service parameters
@param callbacks - load and error handlers for each service method, or optionally globally. Empty defaults will be mixed in to avoid errors.
@param plugins - plugins for read/write and other operations, which modify default service method behavior
@return {circuits.Service} - the realized service.
Returns an instance of a Service using its SMD .