Package org.tn5250j

Class Session5250

    • Field Detail

      • sesProps

        protected java.util.Properties sesProps
    • Constructor Detail

      • Session5250

        public Session5250​(java.util.Properties props,
                           java.lang.String configurationResource,
                           java.lang.String sessionName,
                           SessionConfig config)
    • Method Detail

      • isSslSocket

        public boolean isSslSocket()
        Returns:
        true when SSL is used and socket is connected.
      • isSslConfigured

        public boolean isSslConfigured()
        Returns:
        true when SSL is configured but not necessary in use
      • isSendKeepAlive

        public boolean isSendKeepAlive()
      • isUseSystemName

        public boolean isUseSystemName()
        Returns:
        true if configured, that the host name should be
      • getConnectionProperties

        public java.util.Properties getConnectionProperties()
      • getAllocDeviceName

        public java.lang.String getAllocDeviceName()
      • getHostName

        public java.lang.String getHostName()
      • showSystemRequest

        public java.lang.String showSystemRequest()
        Description copied from interface: SessionInterface
        Popups a dialog to ask the user for entering a SysReq value.
        Specified by:
        showSystemRequest in interface SessionInterface
        Returns:
        null if nothing to do, else a String containing the users input.
      • setVT

        protected void setVT​(tnvt v)
      • getVT

        public tnvt getVT()
      • setScanningEnabled

        public void setScanningEnabled​(boolean scan)
        Enables or disables scanning.
        Parameters:
        scan - enables scanning when true; disables otherwise.
      • isScanningEnabled

        public boolean isScanningEnabled()
        Checks whether scanning is enabled.
        Returns:
        true if command scanning is enabled; false otherwise.
      • fireScanned

        public final void fireScanned​(java.lang.String command,
                                      java.lang.String remainder)
        This is the callback method for the TNVT when sensing the action cmd screen pattern (!# at position 0,0). This is a thread safe method and will be called from the TNVT read thread!
        Parameters:
        command - discovered in the 5250 stream.
        remainder - are all the other characters on the screen.
      • addScanListener

        public final void addScanListener​(ScanListener listener)
        Parameters:
        listener - a listener to add
      • removeScanListener

        public final void removeScanListener​(ScanListener listener)
        Parameters:
        listener - a scan listener
      • fireSessionChanged

        public final void fireSessionChanged​(int state)
        Notify all registered listeners of the onSessionChanged event.
        Parameters:
        state - The state change property object.
      • addSessionListener

        public final void addSessionListener​(SessionListener listener)
        Add a SessionListener to the listener list.
        Specified by:
        addSessionListener in interface SessionInterface
        Parameters:
        listener - The SessionListener to be added
      • removeSessionListener

        public final void removeSessionListener​(SessionListener listener)
        Remove a SessionListener from the listener list.
        Specified by:
        removeSessionListener in interface SessionInterface
        Parameters:
        listener - The SessionListener to be removed