Class TelnetCommProps

  • All Implemented Interfaces:
    EventListener, IGProp<GProp<?>[]>, IPropCnr, java.lang.Cloneable
    Direct Known Subclasses:
    TerminalProps

    public class TelnetCommProps
    extends SocketCommProps
    This property container contains all properties required for Telnet 3270 and 5250 connections, and extends the SocketProp used for Socket properties.
    Author:
    Christopher Mindus
    • Field Detail

      • DEFAULT_KEEP_ALIVE_INTERVAL

        public static final int DEFAULT_KEEP_ALIVE_INTERVAL
        The default interval used for Keep Alive (in seconds, default = 30).
        See Also:
        Constant Field Values
      • DEFAULT_AUTO_RECONNECT_INTERVAL

        public static final int DEFAULT_AUTO_RECONNECT_INTERVAL
        The default interval used for auto reconnect session (in seconds, default = 3).
        See Also:
        Constant Field Values
      • DEFAULT_AUTO_RECONNECT_ATTEMPTS

        public static final int DEFAULT_AUTO_RECONNECT_ATTEMPTS
        The default attempts count for auto reconnect session (default = 20).
        See Also:
        Constant Field Values
    • Constructor Detail

      • TelnetCommProps

        public TelnetCommProps()
        Creates the Telnet property container without a name. The name must be set in all cases using the setPropertyAtom call.
      • TelnetCommProps

        public TelnetCommProps​(Atom propertyAtom)
        Creates the Telnet property container with the specified name. All system-reserved names for components begins with "$".
        Parameters:
        propertyAtom - the name of the component, unique within it's parent.
    • Method Detail

      • getLUName

        public java.lang.String getLUName()
        Gets the LU name for the terminal session.
        Returns:
        The LU name or null for none.
      • setLUName

        public void setLUName​(java.lang.String luName)
        Sets the LU name for the terminal session.
        Parameters:
        luName - The LU name.
      • doAutoReconnect

        public boolean doAutoReconnect()
        Flag for auto-reconnection of telnet session.
        Returns:
        false (default) or true for auto-reconnection.
      • setAutoReconnect

        public void setAutoReconnect​(boolean autoReconnect)
        Sets the flag for auto-reconnection of telnet session.
        Parameters:
        autoReconnect - false or true for auto-reconnection.
      • getAutoReconnectInterval

        public int getAutoReconnectInterval()
        Gets the auto-reconnect interval in milliseconds.
        Returns:
        The interval in ms, defaults to 1000*DEFAULT_AUTO_RECONNECT_INTERVAL.
      • setAutoReconnectInterval

        public void setAutoReconnectInterval​(int interval)
        Sets the auto-reconnect intervals in milliseconds.
        Parameters:
        interval - New interval.
      • getAutoReconnectAttempts

        public int getAutoReconnectAttempts()
        Gets the auto-reconnect attempts in milliseconds.
        Returns:
        The attempts count, defaults to DEFAULT_AUTO_RECONNECT_ATTEMPTS, 0=infinite retry.
      • setAutoReconnectAttempts

        public void setAutoReconnectAttempts​(int attempts)
        Sets the auto-reconnect attempts, 0=infinite.
        Parameters:
        attempts - Max count of reconnect attempts.
      • doTN3270E

        public boolean doTN3270E()
        Flag indicating 3270 host will do TN3270-E.
        Returns:
        true if TN3270-E is used, false (default) otherwise.
      • setDoTN3270E

        public void setDoTN3270E​(boolean doTN3270E)
        Sets the flag indicating host type (5250 or 3270).
        Parameters:
        doTN3270E - true if TN3270-E is used, false otherwise.
      • do3270NumericFieldOverride

        public boolean do3270NumericFieldOverride()
        Flag indicating 3270 NUMERIC FIELD OVERRIDE option.
        Returns:
        true if the option is active, false (default) otherwise.
      • set3270NumericFieldOverride

        public void set3270NumericFieldOverride​(boolean do3270NumericFieldOverride)
        Sets the flag indicating 3270 NUMERIC FIELD OVERRIDE option.
        Parameters:
        do3270NumericFieldOverride - true if the option is active, false otherwise.
      • getKeepAliveTimeout

        public int getKeepAliveTimeout()
        Gets the keep-alive timeout in milliseconds.
        Returns:
        0 = no timeout, otherwise a millisecond timeout value.
      • setKeepAliveTimeout

        public void setKeepAliveTimeout​(int timeout)
        Sets the keep-alive timeout in milliseconds.
        Parameters:
        timeout - 0 = no timeout (default), otherwise a millisecond timeout value.
      • useKeepAliveNOP

        public boolean useKeepAliveNOP()
        Gets how the Telnet keep-alive is processed: true = NOP (default), false = TimingMark (TM).
        Returns:
        true = NOP, false = TM.
      • setKeepAliveNOP

        public void setKeepAliveNOP​(boolean useNOP)
        Sets how the Telnet keep-alive is processed.
        Parameters:
        useNOP - true = NOP, false = TimingMark (TM).
      • getTerminalTypes

        public java.lang.String[] getTerminalTypes()
        Gets the terminal types as a String array.
        Returns:
        The terminal types, never null.
      • setTerminalTypes

        public void setTerminalTypes​(java.lang.String[] terminalTypes)
        Sets the terminal types from a String array.
        Parameters:
        terminalTypes - The terminal types accepted.
      • getHostCodepage

        public java.lang.String getHostCodepage()
        Gets host codepage (default Cp037 = US English).
        Returns:
        The host codepage.
      • setHostCodepage

        public void setHostCodepage​(java.lang.String hostCodepage)
        Sets host codepage.
        Parameters:
        hostCodepage - The String for the host codepage.
      • get5250KbdType

        public java.lang.String get5250KbdType()
        Gets the keyboard type (5250-specific).
        Returns:
        null if not defined, otherwise the keyboard type.
      • set5250KbdType

        public void set5250KbdType​(java.lang.String kbdType)
        Sets the keyboard type (5250-specific).
        Parameters:
        kbdType - The keyboard type.