dist/monitor-all.js
function(hostName, appName, appInstance) {
      var t = this, thisInstance = 0;
      return t.connections.find(function(conn) {

        // Host or app matches if not specified or if specified and equal
        var matchesHost = !hostName || conn.isThisHost(hostName);
        var matchesApp = !appName || appName === conn.get('remoteAppName');
        var matchesInstance = !appInstance || appInstance === conn.get('remoteAppInstance');
        var remoteFirewall = conn.get('remoteFirewall');

        // This is a match if host + app + instance matches, and it's not firewalled
        return (!remoteFirewall && matchesHost && matchesApp && matchesInstance);
      });
    }
function(hostName, appName, appInstance) {
      var t = this, thisInstance = 0;
      return t.connections.find(function(conn) {

        // Host or app matches if not specified or if specified and equal
        var matchesHost = !hostName || conn.isThisHost(hostName);
        var matchesApp = !appName || appName === conn.get('remoteAppName');
        var matchesInstance = !appInstance || appInstance === conn.get('remoteAppInstance');
        var remoteFirewall = conn.get('remoteFirewall');

        // This is a match if host + app + instance matches, and it's not firewalled
        return (!remoteFirewall && matchesHost && matchesApp && matchesInstance);
      });
    }
function ( hostName , appName , appInstance ) { var t = this , thisInstance = 0 ; return t . connections . find ( function ( conn ) { // Host or app matches if not specified or if specified and equal var matchesHost = ! hostName || conn . isThisHost ( hostName ) ; var matchesApp = ! appName || appName === conn . get ( 'remoteAppName' ) ; var matchesInstance = ! appInstance || appInstance === conn . get ( 'remoteAppInstance' ) ; var remoteFirewall = conn . get ( 'remoteFirewall' ) ; // This is a match if host + app + instance matches, and it's not firewalled return ( ! remoteFirewall && matchesHost && matchesApp && matchesInstance ) ; } ) ; }
Find an existing connection to use

This method looks into the existing known connections to find one
that matches the specified parameters.

Firewalled connections are not returned.

@method findConnection
@protected
@param hostName {String} - Host name to find a connection for (null = any host)
@param appName {String} - App name to find a connection with (null = any app)
@param appInstance {Any} - Application instance running on this host (null = any instance)
@return connection {Connection} - A Connection object if found, otherwise null
Find an existing connection to use