comparison src/com/five_ten_sg/connectbot/service/TerminalBridge.java @ 31:139394237973 tn5250

start tn5250 integration
author Carl Byington <carl@five-ten-sg.com>
date Tue, 10 Jun 2014 12:00:07 -0700
parents 017eeed8332c
children 69bc44954bb5
comparison
equal deleted inserted replaced
30:d738f6b876fe 31:139394237973
316 /** 316 /**
317 * Spawn thread to open connection and start login process. 317 * Spawn thread to open connection and start login process.
318 */ 318 */
319 protected void startConnection() { 319 protected void startConnection() {
320 transport = TransportFactory.getTransport(host.getProtocol()); 320 transport = TransportFactory.getTransport(host.getProtocol());
321 keyListener = transport.getTerminalKeyListener(manager, this, buffer, host.getEncoding()); 321 transport.setLinks(manager, this, host, buffer, emulation);
322
323 keyListener = transport.getTerminalKeyListener();
322 324
323 String monitor_init = host.getMonitor(); 325 String monitor_init = host.getMonitor();
324 if ((monitor_init != null) && (monitor_init.length() > 0)) { 326 if ((monitor_init != null) && (monitor_init.length() > 0)) {
325 monitor = new TerminalMonitor(manager, buffer, keyListener, parent, monitor_init); 327 monitor = new TerminalMonitor(manager, buffer, keyListener, parent, monitor_init);
326 } 328 }
327 329
328 transport.setBridge(this);
329 transport.setManager(manager);
330 transport.setHost(host);
331 transport.setCompression(host.getCompression()); 330 transport.setCompression(host.getCompression());
332 transport.setHttpproxy(host.getHttpproxy()); 331 transport.setHttpproxy(host.getHttpproxy());
333 transport.setUseAuthAgent(host.getUseAuthAgent()); 332 transport.setUseAuthAgent(host.getUseAuthAgent());
334 transport.setEmulation(emulation);
335 333
336 if (transport.canForwardPorts()) { 334 if (transport.canForwardPorts()) {
337 for (PortForwardBean portForward : manager.hostdb.getPortForwardsForHost(host)) 335 for (PortForwardBean portForward : manager.hostdb.getPortForwardsForHost(host))
338 transport.addPortForward(portForward); 336 transport.addPortForward(portForward);
339 } 337 }
429 public void onConnected() { 427 public void onConnected() {
430 disconnected = false; 428 disconnected = false;
431 buffer.reset(); 429 buffer.reset();
432 // We no longer need our local output. 430 // We no longer need our local output.
433 localOutput.clear(); 431 localOutput.clear();
434 // previously tried vt100 and xterm for emulation modes
435 // "screen" works the best for color and escape codes
436 buffer.setAnswerBack(emulation); 432 buffer.setAnswerBack(emulation);
437 433
438 if (HostDatabase.DELKEY_BACKSPACE.equals(host.getDelKey())) 434 if (HostDatabase.DELKEY_BACKSPACE.equals(host.getDelKey()))
439 buffer.setBackspace(vt320.DELETE_IS_BACKSPACE); 435 buffer.setBackspace(vt320.DELETE_IS_BACKSPACE);
440 else 436 else