Transport abstract constructor.

@param {Object} options.
@api private
196924
function Transport (opts) {
  this.path = opts.path;
  this.host = opts.host;
  this.port = opts.port;
  this.secure = opts.secure;
  this.query = opts.query;
  this.timestampParam = opts.timestampParam;
  this.timestampRequests = opts.timestampRequests;
  this.readyState = '';
}
1209011
function createTransportServerType() {
    log.info("create transport server type");
    // [ -Events- ]
    // message - a message with transport client source
    // client closed - emitted when a client is closed, with the client
    // close - emitted when the transport is closed
    // error - emitted when the underlying ws has an error
    // listening - emitted when the server is listening
    // [ -Constructor- ]
    function TransportServer() {
        log.info("instantiate transport server");
        // get non-ambiguous this
        var self = this;
        // Call parent constructor
        TransportServer.super_.call(self);
        // Internal structures
        self._ws = undefined;
        self._id = _.uniqueId();
        self._closed = false;
        // state listeners
        self.once('close', function handleClosed() {
            self._closed = true;
        });
        // constructor. return undefined
        return undefined;
    }
    // [ -Inheritance- ]
    util.inherits(TransportServer, events.EventEmitter);
    // [ -Private API- ]
    TransportServer.prototype._handleConnection = function transportServerHandleConnection(wsc) {
        log.info("Transport server handle connection");
        // create a source with send/close
        var source = new ActualTransportClient();
        source.wrap(wsc);
        // proxy events
        source.on('message', this.emit.bind(this, 'message', source));
        source.on('close', this.emit.bind(this, 'client closed', source));
        // Higher layers don't currently need any insight.  If a source
        // has an error, just close it.
        source.on('error', function handleError() {
            source.close();
        });
        // allow chaining
        return this;
    };
    // [ -Public API- ]
    // listen for remote websocket connections
    TransportServer.prototype.listen = function websocketListen(options, cb) {
        log.info("websocket server listen");
        // only allow this to be called once on the object
        if (this._ws) {
            // throw immediately - this is programmer error
            throw new VError("'listen' has already been called on this transport object.");
        }
        // add cb to listeners
        if (cb) {
            this.on('listening', cb);
        }
        // set up websocket server
        this._ws = new ws.Server(options);
        // proxy some events
        // FIXME - be intentional about what errors are passed up
        // at each stage
        this._ws.on('listening', this.emit.bind(this, 'listening'));
        this._ws.on('error', this.emit.bind(this, 'error'));
        this._ws._server.on('close', this.emit.bind(this, 'close'));
        // handle connections from clients
        this._ws.on('connection', this._handleConnection.bind(this));
        // it doesn't make sense to do anything with the object until listen
        // calls back, so return null
        return null;
    };
    // close connection(s)
    TransportServer.prototype.close = function websocketClose() {
        log.info("websocket close");
        if (this._closed) {
            throw new VError("Transport Server has already been closed");
        }
        this._ws.close();
        // it doesn't make sense to do anything with the object
        // after close, so return null
        return null;
    };
    return TransportServer;
}
1028991
function(options, callback)
{
    // Setup IPC connection
    this.ipc = new WorkerIPC();

    // Setup the IPC logger transport
    var workerConf = {
        logger: {
            transports: [
                new (IPCLogger)({
                    worker    : this,
                    colorize  : true,
                    timestamp : function() {

                        var part = moment().format().yellow.bold;

                        if (cluster.isMaster) {
                            part += ' [Master]'.red.bold;
                        } else {
                            part += ' [Worker]'.white.bold;
                        }

                        return part;
                    },
                    level  : 'debug',
                    silent : false
                })
            ]
        },
        requestLogger: {
            transports: [
                new (IPCLogger)({
                    type     : 'request',
                    worker   : this,
                    colorize : false,
                    level    : 'info',
                    silent   : false
                })
            ]
        }
    };

    // Extend the given worker configuration
    arguments[0] = extend(true, workerConf, arguments[2] || {});

    // Call the super constructor
    Worker.super_.call(this, options);
}
581424
function constructor(options, error, name) {
    Pagelet.prototype.constructor.call(this, options);

    if (name) this.name = name;
    this.data = error instanceof Error ? error : {};
  }
588011
function BLETransport(opts) {
  if (!(this instanceof BLETransport)) {
    return new BLETransport(opts);
  }

  this.configuration = opts.configuration;
  this.controller = Controllers[this.configuration.controller];
  if (!this.controller) {
    throw new Error("No valid BLE controller defined");
  }
}
1077706
function( options ){
      var array = $$.util.getMap(options);

      if( array == null ){ // if empty, put initial array
        $$.util.setMap( $.extend({}, options, {
          value: [ options.value ]
        }) );
      } else {
        array.push( options.value );
      }
    }
1072906
function TcpConnection(options) {
    this.options = util._extend({host: 'localhost', port: '80', localAddress: process.env.LOCAL_ADDRESS}, options);
    this._config = JSON.stringify(this.options);
    if (logger.isDebugEnabled()) {
        logger.debug('Created with %s', this._config);
    }
}
313654
function initHandlers(options, handlerClass) {
    var optHandlers = Array.isArray(options[handlerClass]) ?
          options[handlerClass] : [options[handlerClass]],
      handlers = [];
    optHandlers.forEach(function(handler) {
      if (typeof handler === 'function') {
        handlers.push(handler);
      } else if (typeof handler === 'string' && builtinHandler[handlerClass][handler]) {
        handlers.push(builtinHandler[handlerClass][handler]);
      }
    });
    return handlers;
  }
747666
function Buildit(opts) {
	opts = opts || {};

	this.cwd = opts.baseUrl || process.cwd();
	this.name = opts.name;
	this.locals = {};
	this.externals = [];

	if (opts.define) {
		this.define = opts.define;
	}

	if (opts.exports) {
		this.exports = opts.exports;
	}

	if (opts.extensions) {
		this.extensions = opts.extensions;
	}
}
1266072
function defaultJsExporter(variables, options, root) {
	const pathname = options.destination || root.source && root.source.input && root.source.input.file && root.source.input.file + '.js' || 'custom-variables.js';
	const contents = Object.keys(variables).reduce(
		(buffer, key) => `${ buffer }export const ${ key } = ${ JSON.stringify(variables[key]).replace(/(^|{|,)"(.+?)":/g, '$1$2:') };\n`,
		''
	);

	return new Promise((resolve, reject) => {
		fs.writeFile(
			pathname,
			contents,
			(error) => error ? reject(error) : resolve()
		);
	});
}
190061
function (arg) {
            var request = arg.req;
            var reqId = request.id;
            // var method = request.method;
            var transport = arg.transport.instance || Aria.getClassRef(arg.transport.classpath);

            var transportCallback = {
                fn : this._handleResponse,
                scope : this,
                args : request
            };

            if (!transport.isReady) {
                // Wait for it to be ready
                return transport.init(reqId, transportCallback);
            }

            // Here we're going to make a request
            this.trafficUp += request.requestSize;

            transport.request(request, transportCallback);
        }
402642
function(options) {
    var CustomProperty = function() {};
    lib.inherits.inherits(CustomProperty,Property);
    lib.extend.extend(CustomProperty,options);
    return CustomProperty;
  }
365911
function(factory, options) {
			this.base(options);
			this.factory = factory;
			this.callback(this.callbacks.init);	
			this.callback(this.callbacks.create);
		}
339852
function createAbstractClass(params, constructor) {
        var def,
            savedMembers,
            key,
            value;

        // Handle abstract methods
        if (hasOwn(params, '$abstracts')) {
            savedMembers = params.$abstracts;
            delete params.$abstracts;
        }

        // Create the class definition
        def = Class.$create(params, constructor);
        def[$abstract] = true;

        // Grab binds
        if (savedMembers) {
            for (key in savedMembers) {
                value = savedMembers[key];

                if (value[$bound]) {
                    insert(def[$class].binds, key);
                }
            }
        }

        return def;
    }
629525
function(options) {
        OpenLayers.Control.prototype.initialize.apply(this, [options]);
        
        this.registry = OpenLayers.Util.extend({
            "moveend": this.getState
        }, this.registry);
        
        var previousOptions = {
            trigger: OpenLayers.Function.bind(this.previousTrigger, this),
            displayClass: this.displayClass + " " + this.displayClass + "Previous"
        };
        OpenLayers.Util.extend(previousOptions, this.previousOptions);
        this.previous = new OpenLayers.Control.Button(previousOptions);
        
        var nextOptions = {
            trigger: OpenLayers.Function.bind(this.nextTrigger, this),
            displayClass: this.displayClass + " " + this.displayClass + "Next"
        };
        OpenLayers.Util.extend(nextOptions, this.nextOptions);
        this.next = new OpenLayers.Control.Button(nextOptions);

        this.clear();
    }
716333
function MuxFactory(options) {

    function Class (receiveProps) {
        Ctor.call(this, options, receiveProps)
    }
    Class.prototype = Object.create(Mux.prototype)
    return Class
}
101898
function init(options) {
  options = options || {}
  var port = options.port || 6466
  global.client = global.client || socketIOClient(`http://localhost:${port}`)
  client = global.client
  log.debug(`Started global js socketIO client for ${process.env.ADAPTER} at ${port}`)
  client.emit('join', ioid) // first join for serialization
  client.on('disconnect', client.disconnect)
  client.on('take', hasher.handle) // add listener
  
  // add methods
  client.pass = pass
  client.clientPass = clientPass
  return client
}