com.ibm.ctg.monitoring

Class DataFlowsMonitor

  • java.lang.Object
    • com.ibm.ctg.monitoring.DataFlowsMonitor
  • All Implemented Interfaces:
    RequestExit


    public class DataFlowsMonitor
    extends java.lang.Object
    implements RequestExit
    The DataFlowsMonitor is designed to output all the relevant data available on the eventFired method. It is written so subclasses can re-use the output methods. Output will be written to System.out, unless overridden by the system property defined by com.ibm.ctg.DataFlowsMonitor.requestexit.BasicMonitor#STDOUT_PROPERTY STDOUT_PROPERTY
    • Constructor Summary

      Constructors 
      Constructor and Description
      DataFlowsMonitor()
      Default constructor initializes the output methods.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void appendFullyQualifiedApplid(java.lang.StringBuffer message, java.lang.String name, java.lang.String qualifier, java.lang.String applid, java.lang.String prefix)
      Appends the fully qualified APPLID to the message that is output for this event.
      void appendRequestData(java.lang.StringBuffer message, RequestData requestData, java.lang.Object object, java.lang.String prefix)
      Append the request data using simple formatting.
      java.lang.String dumpEventData(java.lang.String originator, RequestEvent event, java.util.Map<RequestData,java.lang.Object> data)
      Method to format all the information available at an event.
      static java.lang.String dumpToHex(byte[] bytes)
      Format an array of bytes into a string containing the bytes as hexadecimal characters and a printable representation of the bytes as a string
      void eventFired(RequestEvent event, java.util.Map<RequestData,java.lang.Object> data)
      This method is called for each defined MonitorEvent.
      java.io.PrintStream getDefaultStdout()
      This method can be overridden by subclasses to use a different default PrintStream.
      java.lang.String getSystemEnvironment()
      Create a multiline string of the significant system properties.
      java.lang.String myName()
      This method can be overridden by subclasses to give a name to identify the output.
      void print(java.lang.String args)
      Simple output routine to send a string to our currently set output PrintWriter.
      void println(java.lang.String string)
      Simple output routine to send a string to our currently set PrintWriter, appending a newline, and flushing the buffer.
      static java.lang.String toHex(byte[] bytes)
      Method to format an array of bytes into a readable string of hexadecimal characters.
      • Methods inherited from class java.lang.Object

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

      • STDOUT_PROPERTY

        public static final java.lang.String STDOUT_PROPERTY
        The Java property name used to set the output file name.
        See Also:
        Constant Field Values
      • onZos

        public boolean onZos
      • onWindows

        public boolean onWindows
      • lineSeperator

        public java.lang.String lineSeperator
      • dataLength

        public int dataLength
    • Constructor Detail

      • DataFlowsMonitor

        public DataFlowsMonitor()
        Default constructor initializes the output methods.
    • Method Detail

      • eventFired

        public void eventFired(RequestEvent event,
                      java.util.Map<RequestData,java.lang.Object> data)
        Description copied from interface: RequestExit
        This method is called for each defined MonitorEvent. Exits can selectively process these using the event parameter. In each call the data contains a read-only Map of the data available at that point for this flow. Any processing in this method should be kept to a minimum to reduce the impact on the flows.
        Specified by:
        eventFired in interface RequestExit
        Parameters:
        event - at which the exit is called
        data - read-only Map of monitoring data
      • myName

        public java.lang.String myName()
        This method can be overridden by subclasses to give a name to identify the output.
        Returns:
        defaults to the name of the current class
      • getDefaultStdout

        public java.io.PrintStream getDefaultStdout()
        This method can be overridden by subclasses to use a different default PrintStream.
        Returns:
        PrintStream to use as default output device
      • dumpEventData

        public java.lang.String dumpEventData(java.lang.String originator,
                                     RequestEvent event,
                                     java.util.Map<RequestData,java.lang.Object> data)
        Method to format all the information available at an event.
        Parameters:
        originator - text to identify originator
        event - the event that fired
        data - the data found on that event
        Returns:
        User readable dump of exit info
      • appendFullyQualifiedApplid

        public void appendFullyQualifiedApplid(java.lang.StringBuffer message,
                                      java.lang.String name,
                                      java.lang.String qualifier,
                                      java.lang.String applid,
                                      java.lang.String prefix)
        Appends the fully qualified APPLID to the message that is output for this event. The fully qualified APPLID is made up of the 2 CICS TG fields used to identify the Gateway daemon or Gateway classes.
        Parameters:
        message - the message that is being built up for this event
        name - the name of the field we are outputting
        qualifier - the APPLID qualifier value
        applid - the APPLID value
        prefix - the prefix for the message insert
      • appendRequestData

        public void appendRequestData(java.lang.StringBuffer message,
                             RequestData requestData,
                             java.lang.Object object,
                             java.lang.String prefix)
        Append the request data using simple formatting. Using the getDataType method to select formatting method.
        Parameters:
        message - the message that is being built up for this event
        requestData - data field to be formatted
        object - data to be formatted
      • println

        public void println(java.lang.String string)
        Simple output routine to send a string to our currently set PrintWriter, appending a newline, and flushing the buffer. Output will be written to System.out, unless overridden by the system property defined by com.ibm.ctg.DataFlowsMonitor.requestexit.BasicMonitor#STDOUT_PROPERTY STDOUT_PROPERTY. To ensure the whole message goes in one block it is synchronized.
        Parameters:
        string - string to output
      • print

        public void print(java.lang.String args)
        Simple output routine to send a string to our currently set output PrintWriter.
        Parameters:
        args - string to output
      • dumpToHex

        public static java.lang.String dumpToHex(byte[] bytes)
        Format an array of bytes into a string containing the bytes as hexadecimal characters and a printable representation of the bytes as a string
        Parameters:
        bytes - array to format
        Returns:
        printable string
      • toHex

        public static java.lang.String toHex(byte[] bytes)
        Method to format an array of bytes into a readable string of hexadecimal characters.
        Parameters:
        bytes - array to format
        Returns:
        String representing bytes in hex
      • getSystemEnvironment

        public java.lang.String getSystemEnvironment()
        Create a multiline string of the significant system properties.
        Returns:
        the system properties

©Copyright IBM Corp. 1994, 2025


Legal