com.ibm.jtopenlite

Class HostServerConnection

  • java.lang.Object
    • com.ibm.jtopenlite.HostServerConnection
    • Method Detail

      • isDefaultDatastreamDebug

        public static boolean isDefaultDatastreamDebug()
        Returns true if debugging is enabled by default for all HostServerConnection datastreams.
      • setDefaultDatastreamDebug

        public static void setDefaultDatastreamDebug(boolean debug)
        If debug is true, enables by default debugging on all HostServerConnection datastreams created after the call to this method.
      • getBytesReceived

        public long getBytesReceived()
        Returns the total number of bytes this connection has read since it was opened. If an I/O exception has occurred with this stream, the number returned by this method may not reflect any partial datastream bytes that may have actually been read before the exception took place.
      • getBytesSent

        public long getBytesSent()
        Returns the total number of bytes this connection has written since it was opened. If an I/O exception has occurred with this stream, the number returned by this method may not reflect any partial datastream bytes that may have actually been written before the exception took place. Additionally, the number of bytes written over the TCP socket may be less, if the underlying stream has not yet been flushed.
      • isDatastreamDebug

        public boolean isDatastreamDebug()
        Returns true if datastream debugging is currently enabled.
      • setDatastreamDebug

        public void setDatastreamDebug(boolean debug)
        If debug is true, enables datastream debugging for this connection.
      • close

        public final void close()
                         throws java.io.IOException
        Sends an "end job" datastream (if supported) and closes the underlying socket.
        Specified by:
        close in interface Connection
        Throws:
        java.io.IOException
      • sendEndJobRequest

        protected abstract void sendEndJobRequest()
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • finalize

        protected final void finalize()
                               throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • isClosed

        public final boolean isClosed()
        Returns true if close() has been called on this connection.
        Specified by:
        isClosed in interface Connection
      • getInfo

        public final SystemInfo getInfo()
        Returns the system information associated with this connection.
      • getUser

        public final java.lang.String getUser()
        Returns the currently authenticated user of this connection.
        Specified by:
        getUser in interface Connection
      • getJobName

        public final java.lang.String getJobName()
        Returns the host server job string for the job that is connected to this connection.
        Specified by:
        getJobName in interface Connection
      • getEncryptedPassword

        protected static byte[] getEncryptedPassword(byte[] userBytes,
                                  byte[] passwordBytes,
                                  byte[] clientSeed,
                                  byte[] serverSeed,
                                  int passwordLevel)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • writePadEBCDIC

        protected static void writePadEBCDIC(java.lang.String s,
                          int len,
                          HostServerConnection.HostOutputStream out)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • writeStringToUnicodeBytes

        protected static void writeStringToUnicodeBytes(java.lang.String s,
                                     HostServerConnection.HostOutputStream out)
                                                 throws java.io.IOException
        Throws:
        java.io.IOException