node_worker.classes.build.js
function (parameters) {
        parameters = parameters || {};
        if (parameters.logger) {
            this.logger = parameters.logger;
        } else {
            /*eslint-disable no-console*/
            var doLog = function () {
                console.log.apply(console, arguments);
            };
            this.logger = {
                debug: doLog,
                log: doLog,
                info: doLog,
                warn: doLog,
                error: doLog
            };
            console.warn('Since v1.3.0 ExecutorClient requires a logger, falling back on console.log.');
            /*eslint-enable no-console*/
        }

        this.logger.debug('ctor', {metadata: parameters});

        this.isNodeJS = (typeof window === 'undefined') && (typeof process === 'object');
        this.isNodeWebkit = (typeof window === 'object') && (typeof process === 'object');
        //console.log(isNode);
        if (this.isNodeJS) {
            this.logger.debug('Running under node');
            this.server = '127.0.0.1';
            this.httpsecure = false;
        }

        this.server = parameters.server || this.server;
        this.serverPort = parameters.serverPort || this.serverPort;
        this.httpsecure = (parameters.httpsecure !== undefined) ? parameters.httpsecure : this.httpsecure;
        if (this.isNodeJS) {
            this.http = this.httpsecure ? require('https') : require('http');
        }

        this.origin = '';
        if (this.httpsecure !== undefined && this.server && this.serverPort) {
            this.origin = (this.httpsecure ? 'https://' : 'http://') + this.server + ':' + this.serverPort;
        }
        if (parameters && typeof parameters.relativeUrl === 'string') {
            this.relativeUrl = parameters.relativeUrl;
        } else if (typeof WebGMEGlobal !== 'undefined' && WebGMEGlobal.gmeConfig &&
            typeof WebGMEGlobal.gmeConfig.client.mountedPath === 'string') {
            this.relativeUrl = WebGMEGlobal.gmeConfig.client.mountedPath + '/rest/executor/';
        } else {
            this.relativeUrl = '/rest/executor/';
        }
        this.executorUrl = this.origin + this.relativeUrl;

        // TODO: TOKEN???
        // TODO: any ways to ask for this or get it from the configuration?
        if (parameters.executorNonce) {
            this.executorNonce = parameters.executorNonce;
        }

        this.logger.debug('origin', this.origin);
        this.logger.debug('executorUrl', this.executorUrl);
    }
function (parameters) {
        parameters = parameters || {};
        if (parameters.logger) {
            this.logger = parameters.logger;
        } else {
            /*eslint-disable no-console*/
            var doLog = function () {
                console.log.apply(console, arguments);
            };
            this.logger = {
                debug: doLog,
                log: doLog,
                info: doLog,
                warn: doLog,
                error: doLog
            };
            console.warn('Since v1.3.0 ExecutorClient requires a logger, falling back on console.log.');
            /*eslint-enable no-console*/
        }

        this.logger.debug('ctor', {metadata: parameters});

        this.isNodeJS = (typeof window === 'undefined') && (typeof process === 'object');
        this.isNodeWebkit = (typeof window === 'object') && (typeof process === 'object');
        //console.log(isNode);
        if (this.isNodeJS) {
            this.logger.debug('Running under node');
            this.server = '127.0.0.1';
            this.httpsecure = false;
        }

        this.server = parameters.server || this.server;
        this.serverPort = parameters.serverPort || this.serverPort;
        this.httpsecure = (parameters.httpsecure !== undefined) ? parameters.httpsecure : this.httpsecure;
        if (this.isNodeJS) {
            this.http = this.httpsecure ? require('https') : require('http');
        }

        this.origin = '';
        if (this.httpsecure !== undefined && this.server && this.serverPort) {
            this.origin = (this.httpsecure ? 'https://' : 'http://') + this.server + ':' + this.serverPort;
        }
        if (parameters && typeof parameters.relativeUrl === 'string') {
            this.relativeUrl = parameters.relativeUrl;
        } else if (typeof WebGMEGlobal !== 'undefined' && WebGMEGlobal.gmeConfig &&
            typeof WebGMEGlobal.gmeConfig.client.mountedPath === 'string') {
            this.relativeUrl = WebGMEGlobal.gmeConfig.client.mountedPath + '/rest/executor/';
        } else {
            this.relativeUrl = '/rest/executor/';
        }
        this.executorUrl = this.origin + this.relativeUrl;

        // TODO: TOKEN???
        // TODO: any ways to ask for this or get it from the configuration?
        if (parameters.executorNonce) {
            this.executorNonce = parameters.executorNonce;
        }

        this.logger.debug('origin', this.origin);
        this.logger.debug('executorUrl', this.executorUrl);
    }
function ( parameters ) { parameters = parameters || { } ; if ( parameters . logger ) { this . logger = parameters . logger ; } else { /*eslint-disable no-console*/ var doLog = function ( ) { console . log . apply ( console , arguments ) ; } ; this . logger = { debug : doLog , log : doLog , info : doLog , warn : doLog , error : doLog } ; console . warn ( 'Since v1.3.0 ExecutorClient requires a logger, falling back on console.log.' ) ; /*eslint-enable no-console*/ } this . logger . debug ( 'ctor' , { metadata : parameters } ) ; this . isNodeJS = ( typeof window === 'undefined' ) && ( typeof process === 'object' ) ; this . isNodeWebkit = ( typeof window === 'object' ) && ( typeof process === 'object' ) ; //console.log(isNode);
 if ( this . isNodeJS ) { this . logger . debug ( 'Running under node' ) ; this . server = '127.0.0.1' ; this . httpsecure = false ; } this . server = parameters . server || this . server ; this . serverPort = parameters . serverPort || this . serverPort ; this . httpsecure = ( parameters . httpsecure !== undefined ) ? parameters . httpsecure : this . httpsecure ; if ( this . isNodeJS ) { this . http = this . httpsecure ? require ( 'https' ) : require ( 'http' ) ; } this . origin = '' ; if ( this . httpsecure !== undefined && this . server && this . serverPort ) { this . origin = ( this . httpsecure ? 'https://' : 'http://' ) + this . server + ':' + this . serverPort ; } if ( parameters && typeof parameters . relativeUrl === 'string' ) { this . relativeUrl = parameters . relativeUrl ; } else if ( typeof WebGMEGlobal !== 'undefined' && WebGMEGlobal . gmeConfig && typeof WebGMEGlobal . gmeConfig . client . mountedPath === 'string' ) { this . relativeUrl = WebGMEGlobal . gmeConfig . client . mountedPath + '/rest/executor/' ; } else { this . relativeUrl = '/rest/executor/' ; } this . executorUrl = this . origin + this . relativeUrl ; // TODO: TOKEN???
 // TODO: any ways to ask for this or get it from the configuration?
 if ( parameters . executorNonce ) { this . executorNonce = parameters . executorNonce ; } this . logger . debug ( 'origin' , this . origin ) ; this . logger . debug ( 'executorUrl' , this . executorUrl ) ; }
Client for creating, monitoring, and receiving output executor jobs.
This client is used by the Executor Workers and some of the API calls are not
meant to be used by "end users".

@param {object} parameters
@param {object} parameters.logger
@constructor
@alias ExecutorClient
Client for creating monitoring and receiving output executor jobs . This client is used by the Executor Workers and some of the API calls are not meant to be used by end users .