all options for make:listener
344423
public function makeListener()
    {
        $this->options['name'] = $this->ask('Listener Name (Example: MyListener)');

        if ($this->confirm('Do you know the event to listen for?')) {
            $this->options['--event'] = $this->ask('The event class being listened for', '');
        }

        if ($this->confirm('Will this event be queued')) {
            $this->options['--queued'] = '';
        }
    }
1144339
function registerListeners() {
  const exit = function exit(signal) {
    console.log(chalk.bgBlack.yellow(`Received ${signal} => Exiting`))
    process.exit()
  }
  const SIGABRT = 'SIGABRT'
  const SIGHUP = 'SIGHUP'
  const SIGINT = 'SIGINT'
  const SIGQUIT = 'SIGQUIT'
  const SIGTERM = 'SIGTERM'

  process.on(SIGABRT, () => exit(SIGABRT))
  process.on(SIGHUP, () => exit(SIGHUP))
  process.on(SIGINT, () => exit(SIGINT))
  process.on(SIGQUIT, () => exit(SIGQUIT))
  process.on(SIGTERM, () => exit(SIGTERM))
}
599337
function listener (event, done) {
  return function onevent (arg1) {
    var args = new Array(arguments.length)
    var ee = this
    var err = event === 'error'
      ? arg1
      : null

    // copy args to prevent arguments escaping scope
    for (var i = 0; i < args.length; i++) {
      args[i] = arguments[i]
    }

    done(err, ee, event, args)
  }
}
560240
function main(browserify, options) {
	options = adjustOptions(options);
	options = defaultOptions(browserify, options);

	return browserify
		.plugin(watchAdditional, options)
		.plugin(flexiRequire, options);
}
945823
function addListeners() {
	if (listenersAdded) return;
	listenersAdded = true;

	if (cluster.isMaster) {
		// Listen for worker responses to requests for local metrics
		cluster.on('message', (worker, message) => {
			if (message.type === GET_METRICS_RES) {
				const request = requests.get(message.requestId);
				message.metrics.forEach(registry => request.responses.push(registry));
				request.pending--;

				if (request.pending === 0) {
					// finalize
					requests.delete(message.requestId);
					clearTimeout(request.errorTimeout);

					if (request.failed) return; // Callback already run with Error.

					const registry = AggregatorRegistry.aggregate(request.responses);
					const promString = registry.metrics();
					request.done(null, promString);
				}
			}
		});
	}
}
744127
private TreeBuilder<T> listen(Listener<T> listener, String resourceSelector) {
        return TreeBuilder.<T>builder(new ListenerTree<T>(build(), listener,
                PathUtil.<T>resourceSelector(resourceSelector)));
    }
473098
public TreeBuilder<T> listen(Listener<T> listener) {
        return listen(listener, PathUtil.allpathSelector());
    }
744940
function Listener(handler, once) {
  assert(typeof handler === 'function', '`handler` must be a function.');
  assert(typeof once === 'boolean', '`once` must be a function.');
  this.handler = handler;
  this.once = once;
}
1140432
function filterListeners (listenerCollection) {
        return function(filters) {
            var handlers = [];

            _.each(listenerCollection, function(listener){
                handlers = handlers.concat( findMatch(filters, listener) );
            });

            return handlers;
        };
    }
239752
private function registerListenerMakeCommand()
    {
        $this->app->bindShared('command.make.package.listener', function ($app)
        {
            return new ListenerMakeCommand($app['files'], $app['packages']);
        });

        $this->commands('command.make.package.listener');
    }
850619
function(type, data){
            var listeners = _cache[type],len = 0;
            if(!$.isUndefined(listeners)){
                var args = [].slice.call(arguments, 0);
                args = args.length > 2 ? args.splice(2, args.length-1) : [];
                args = [data].concat(args);

                len = listeners.length;
                for(var i = 0; i<len;i++){
                    var listener = listeners[i];
                    if(listener && listener.callback) {
                        args = args.concat(listener.args);
                        listener.callback.apply(listener.scope, args);
                    }
                }
            }
            return this;
        }
517765
function (name, data, options) {
            var _listeners = this.__handlers__[name],
                _listener,
                _result = null;
            if (_listeners) {
                for (var i = 0, length = _listeners.length; i < length; i++) {
                    _listener = _listeners[i];
                    if (_listener && _listener.handler) {
                        if(options && options.method=='apply'){
                            _result = _listener.handler.apply(_listener.context || _listener.owner, data);
                        } else {
                            _result = _listener.handler.call(_listener.context || _listener.owner, _listener.owner, data, options);
                        }
                        if (false === _result) {
                            return false;
                        }
                    }
                }
            }

            return this;
        }
847808
def get_listeners(self):
        """"""
        return [(name, getattr(self, method_name)) for name, method_name in self.__cog_listeners__]
762846
def go_ham
      loop do
        read_listeners
        reap_all_listeners(Process::WNOHANG)
        start_listener unless @paused
        case signal = SIGNAL_QUEUE.shift
        when nil
          yawn(@listener_backoff.how_long? || 30.0)
        when :INFO
          dump_object_counts
        when :HUP
          reopen_logs
          log "Restarting listener with new configuration and application."
          prepare_new_listener
        when :USR2
          log "Pause job processing"
          @paused = true
          kill_listener(:QUIT, @current_listener)
          @current_listener = nil
        when :CONT
          log "Resume job processing"
          @paused = false
          kill_all_listeners(:CONT)
        when :INT, :TERM, :QUIT
          log "Shutting down..."
          kill_all_listeners(signal)
          wait_for_workers unless @fast_exit
          break
        end
      end
    end
585421
function getListener(worker, type) {
    const listeners = worker.listeners(type);
    return listeners.length && listeners[0] || null;
}
461092
function Listener(opts) {
  var hash;

  Transform.call(this);
  opts = opts || {};

  hash = crypto.createHash('sha1', opts.delimiter || 'jambalaya');
  hash.setEncoding('hex');
  hash.end();

  this.buffer = new Buffer('');
  this.delimiter = new Buffer('<' + hash.read().substr(0, 10) + '>');
  this.tag_open = false;
}
29887
function addEventListeners(target, types, handler) {
    each(splitStr(types), function(type) {
        target.addEventListener(type, handler, false);
    });
}