com.ibm.ctg.client

Class T

  • java.lang.Object
    • com.ibm.ctg.client.T
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int JNI_TRACE_OFF
      Turn JNI trace off.
      static int JNI_TRACE_ON
      Turn JNI trace on.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static void setDebugOn(boolean bOn)
      Turns all levels of tracing on or off.
      Note: In addition to activating all trace points setDebugOn switches off dump truncation and dump offsets causing the entire data dump to be output to trace.
      static void setDumpOffset(int dOffset)
      Sets the offset that tracing will start hex dumps of the commarea and data flows from.
      static void setfullDataDumpOn(boolean bOn)
      Turns full commarea tracing on or off.
      static boolean setJNITFile(int iOn, java.lang.String strJNITFile)
      Set the JNI trace file.
      static boolean setJNITrace(int iOn)
      Enables or disables JNI tracing.
      static void setOn(boolean bOn)
      Turns product tracing on or off
      static void setOutput(java.io.PrintStream prsNew)
      Sets the PrintStream object that the extra tracing messages are sent to.
      static void setStackOn(boolean bOn)
      Turns stack tracing on or off.
      static void setTFile(boolean bOn, java.lang.String strTFile)
      Turns on tracefile option with no wrapping, filename = strTFile.
      static void setTFile(boolean bOn, java.lang.String strTFile, long traceSize)
      Turns Tracing on or off.
      static void setTimingOn(boolean bOn)
      Deprecated. 
      static void setTruncationSize(int truncSize)
      Sets the size that tracing will truncate hex dumps of the commarea and data flows.
      Note: the setDebugOn(true) and setfullDataDumpOn(true) API calls disable data dump truncation, and cause entire data blocks to be output to trace.
      static void writeLogToTrace(java.lang.String traceMsg)
      Write log messages to trace.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setOn

        public static void setOn(boolean bOn)
        Turns product tracing on or off
        Parameters:
        bOn - true to turn tracing on, false to turn off
      • setDebugOn

        public static void setDebugOn(boolean bOn)
        Turns all levels of tracing on or off.
        Note: In addition to activating all trace points setDebugOn switches off dump truncation and dump offsets causing the entire data dump to be output to trace. Calls to setTruncationSize(int) and setDumpOffset(int) should be made after the setDebugOn call.
        Parameters:
        bOn - true to turn tracing on, false to turn off
      • setStackOn

        public static void setStackOn(boolean bOn)
        Turns stack tracing on or off.
        Parameters:
        bOn - true to turn stack tracing on, false to turn off
      • setTimingOn

        @Deprecated
        public static void setTimingOn(boolean bOn)
        Deprecated. 
        Turns timing information on or off. If on timing is pre-pended to all messages.
        Parameters:
        bOn - true to turn timing on, false to turn timing off
      • setOutput

        public static void setOutput(java.io.PrintStream prsNew)
        Sets the PrintStream object that the extra tracing messages are sent to. By default, tracing is sent to the System.err stream.
        Parameters:
        prsNew - The new PrintStream to use for tracing
      • setfullDataDumpOn

        public static void setfullDataDumpOn(boolean bOn)
        Turns full commarea tracing on or off.
        Parameters:
        bOn - true disables the dump offset and dump truncation settings. The entire data block will be output in the trace.
      • setTruncationSize

        public static void setTruncationSize(int truncSize)
                                      throws java.lang.IllegalArgumentException
        Sets the size that tracing will truncate hex dumps of the commarea and data flows.
        Note: the setDebugOn(true) and setfullDataDumpOn(true) API calls disable data dump truncation, and cause entire data blocks to be output to trace. To specify a truncation size for debug trace the T.setTruncationSize call should be made after the setDebugOn(boolean) call.
        Parameters:
        truncSize - with a minimum value of 0 The truncation size and full data dump flag are unchanged and an IllegalArgumentException is thrown if the input parameter is out of range.
        Throws:
        java.lang.IllegalArgumentException
      • setDumpOffset

        public static void setDumpOffset(int dOffset)
                                  throws java.lang.IllegalArgumentException
        Sets the offset that tracing will start hex dumps of the commarea and data flows from.
        Note: setDebugOn(true) and setfullDataDumpOn(true) will cause the entire data dump to be output to the trace. In order to change the dump offset in a debug trace the setDumpOffset call should be made after the setDebugOn(boolean) call.
        Parameters:
        dOffset - with a minimum value of 0 If the total length of data to be dumped is less than the offset in any instance, the offset value will be ignored and it will behave as if an offset of 0 had been specified. If the offset specified is negative then an IllegalArgumentException will be thrown and the dumpOffset value will be unchanged.
        Throws:
        java.lang.IllegalArgumentException
      • setTFile

        public static void setTFile(boolean bOn,
                    java.lang.String strTFile)
        Turns on tracefile option with no wrapping, filename = strTFile. This will append to an existing file if one is specified.
        Parameters:
        bOn - true to turn tracefile on
        strTFile - filename
      • setTFile

        public static void setTFile(boolean bOn,
                    java.lang.String strTFile,
                    long traceSize)
        Turns Tracing on or off. This will append to an existing file if one is specified.
        Parameters:
        bOn - true to turn tracefile on
        strTFile - filename
        traceSize - wrapping size
      • setJNITFile

        public static boolean setJNITFile(int iOn,
                          java.lang.String strJNITFile)
                                   throws java.io.IOException,
                                          java.lang.IllegalArgumentException
        Set the JNI trace file. This method will only work if the application calling it is running locally to the Gateway.
        Parameters:
        iOn - T.JNI_TRACE_ON to turn JNI tracing on, T.JNI_TRACE_OFF to turn JNI tracing off
        strJNITFile - The filename to trace to
        Returns:
        true if the JNI tracing could successfully be set, false otherwise
        Throws:
        java.io.IOException - if the trace file could not be created due to a file system issue.
        java.lang.IllegalArgumentException
      • setJNITrace

        public static boolean setJNITrace(int iOn)
                                   throws java.lang.IllegalArgumentException
        Enables or disables JNI tracing. This method will only work if the application calling it is running locally to the Gateway.
        Parameters:
        iOn - T.JNI_TRACE_ON to turn JNI tracing on, T.JNI_TRACE_OFF to turn JNI tracing off. If the parameter is neither T.JNI_TRACE_ON or T.JNI_TRACE_OFF then an IllegalArgumentException will be thrown and the trace settings will not be changed
        Returns:
        true if the JNI tracing could successfully be set, false otherwise
        Throws:
        java.lang.IllegalArgumentException
      • writeLogToTrace

        public static void writeLogToTrace(java.lang.String traceMsg)
        Write log messages to trace. Message will only be output if trace is turned on.
        Parameters:
        traceMsg - Preformatted message to write.
©Copyright IBM Corp. 1994, 2012
Legal