sslType = org.tn5250j.transport.SSLConstants.SSL_TYPE_NONE; }
   public void connect() {      String proxyPort = "1080"; // default socks proxy port      boolean enhanced = false;      boolean support132 = false;      int port = 23; // default telnet port      enhanced = sesProps.containsKey(SESSION_TN_ENHANCED);      if (sesProps.containsKey(SESSION_SCREEN_SIZE))         if (((String)sesProps.getProperty(SESSION_SCREEN_SIZE)).equals(SCREEN_SIZE_27X132_STR))            support132 = true;      final tnvt vt = new tnvt(screen,enhanced,support132);      setVT(vt);      vt.setController(this);      if (sesProps.containsKey(SESSION_PROXY_PORT))         proxyPort = (String)sesProps.getProperty(SESSION_PROXY_PORT);      if (sesProps.containsKey(SESSION_PROXY_HOST))         vt.setProxy((String)sesProps.getProperty(SESSION_PROXY_HOST),                     proxyPort);      if (sesProps.containsKey(org.tn5250j.transport.SSLConstants.SSL_TYPE)) {         sslType = (String)sesProps.getProperty(org.tn5250j.transport.SSLConstants.SSL_TYPE);      }      else {         // set default to none         sslType = org.tn5250j.transport.SSLConstants.SSL_TYPE_NONE;      }      vt.setSSLType(sslType);      if (sesProps.containsKey(SESSION_CODE_PAGE))         vt.setCodePage((String)sesProps.getProperty(SESSION_CODE_PAGE));      if (sesProps.containsKey(SESSION_DEVICE_NAME))         vt.setDeviceName((String)sesProps.getProperty(SESSION_DEVICE_NAME));      if (sesProps.containsKey(SESSION_HOST_PORT)) {         port = Integer.parseInt((String)sesProps.getProperty(SESSION_HOST_PORT));      }      else {         // set to default 23 of telnet         port = 23;      }      final String ses = (String)sesProps.getProperty(SESSION_HOST);      final int portp = port;      // lets set this puppy up to connect within its own thread      Runnable connectIt = new Runnable() {            public void run() {               vt.connect(ses,portp);            }        };      // now lets set it to connect within its own daemon thread      //    this seems to work better and is more responsive than using      //    swingutilities's invokelater      Thread ct = new Thread(connectIt);      ct.setDaemon(true);      ct.start();      addSessionListener(this);   }