 # and processing logic based on domain matches and RE match/extract
 # logics, to deal with paths. Remember that this service is just a
 # an internal base class, you generally should not use it directly.
-module.exports.Service = class Service extends Object
+module.exports.Service = class Service extends events.EventEmitter
 
     # Here follows a set of definitions that predefine the usual
     # suspects in establishing the matching patterns. Basically,


_ = require "underscore"
logger = require "winston"
colors = require "colors"
util = require "util"
url = require "url"

        presource = (pattern) -> pattern.test(pathname)
        domainOk = _.some(domains, pdomain)
        resourceOk = _.some(resources, presource)
        parameters = [request, response, next]
        matches = domainOk and resourceOk
        @emit("matches", matches, parameters...)
        return domainOk and resourceOk

    # This method should process the already matched HTTP request.
