Search in sources :

Example 1 with TransWebSocketEngineAdapter

use of org.pentaho.di.trans.ael.websocket.TransWebSocketEngineAdapter in project pentaho-kettle by pentaho.

the class TransSupplier method get.

/**
 * Creates the appropriate trans.  Either
 * 1)  A {@link TransWebSocketEngineAdapter} wrapping an Engine
 * if an alternate execution engine has been selected
 * 2)  A legacy {@link Trans} otherwise.
 */
public Trans get() {
    if (Utils.isEmpty(transMeta.getVariable("engine"))) {
        log.logBasic("Using legacy execution engine");
        return fallbackSupplier.get();
    }
    Variables variables = new Variables();
    variables.initializeVariablesFrom(null);
    String protocol = transMeta.getVariable("engine.protocol");
    String host = transMeta.getVariable("engine.host");
    String port = transMeta.getVariable("engine.port");
    // default value for ssl for now false
    boolean ssl = "https".equalsIgnoreCase(protocol) || "wss".equalsIgnoreCase(protocol);
    return new TransWebSocketEngineAdapter(transMeta, host, port, ssl);
}
Also used : Variables(org.pentaho.di.core.variables.Variables) TransWebSocketEngineAdapter(org.pentaho.di.trans.ael.websocket.TransWebSocketEngineAdapter)

Aggregations

Variables (org.pentaho.di.core.variables.Variables)1 TransWebSocketEngineAdapter (org.pentaho.di.trans.ael.websocket.TransWebSocketEngineAdapter)1