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

com.bytezone.dm3270.telnet.TelnetSubcommand 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.telnet;

import com.bytezone.dm3270.buffers.AbstractTelnetCommand;
import com.bytezone.dm3270.streams.TelnetState;

public abstract class TelnetSubcommand extends AbstractTelnetCommand {

  // subcommands
  public static final byte BINARY = 0x00;
  public static final byte TERMINAL_TYPE = 0x18;
  public static final byte EOR = 0x19;
  public static final byte TN3270E = 0x28;
  public static final byte START_TLS = 0x2E;

  protected SubcommandType type;
  protected String value;

  public enum SubcommandType {
    SEND, IS, DEVICE_TYPE, FUNCTIONS
  }

  public TelnetSubcommand(byte[] buffer, int offset, int length, TelnetState telnetState) {
    super(buffer, offset, length, telnetState);
  }

  public String getValue() {
    return value;
  }

  public String getName() {
    return toString();
  }

  @Override
  public String toString() {
    return String.format("Subcommand: %s %s", type, (value == null ? "" : value));
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy