All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bytezone.dm3270.application.Site Maven / Gradle / Ivy

Go to download

This is a trimmed down version of https://github.com/dmolony/dm3270 to be used as TN3270 client library

There is a newer version: 0.15-lib
Show newest version
package com.bytezone.dm3270.application;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Site {

  private static final Logger LOG = LoggerFactory.getLogger(Site.class);

  public final boolean extended;
  private final String url;
  private int port;

  public Site(String url, int port, boolean extended) {
    this.url = url;
    this.port = port;
    this.extended = extended;
  }

  public String getURL() {
    return url;
  }

  public int getPort() {
    if (port <= 0) {
      LOG.warn("Invalid port value: {}. Fallback to default value {}", port, 23);
      port = 23;
    }
    return port;
  }

  public boolean getExtended() {
    return extended;
  }

  @Override
  public String toString() {
    return String.format("Site [url=%s, port=%d]", getURL(), getPort());
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy