public class DataFlowsMonitor extends java.lang.Object implements RequestExit
| Modifier and Type | Field and Description |
|---|---|
int |
dataLength |
static java.lang.String |
EBCDIC |
java.lang.String |
lineSeperator |
boolean |
onWindows |
boolean |
onZos |
static java.lang.String |
STDOUT_PROPERTY
The Java property name used to set the output file name.
|
| Constructor and Description |
|---|
DataFlowsMonitor()
Default constructor initializes the output 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.
|
public static final java.lang.String STDOUT_PROPERTY
public static final java.lang.String EBCDIC
public boolean onZos
public boolean onWindows
public java.lang.String lineSeperator
public int dataLength
public DataFlowsMonitor()
public void eventFired(RequestEvent event, java.util.Map<RequestData,java.lang.Object> data)
RequestExiteventFired in interface RequestExitevent - at which the exit is calleddata - read-only Map of monitoring datapublic java.lang.String myName()
public java.io.PrintStream getDefaultStdout()
public java.lang.String dumpEventData(java.lang.String originator,
RequestEvent event,
java.util.Map<RequestData,java.lang.Object> data)
originator - text to identify originatorevent - the event that fireddata - the data found on that eventpublic void appendFullyQualifiedApplid(java.lang.StringBuffer message,
java.lang.String name,
java.lang.String qualifier,
java.lang.String applid,
java.lang.String prefix)
message - the message that is being built up for this eventname - the name of the field we are outputtingqualifier - the APPLID qualifier valueapplid - the APPLID valueprefix - the prefix for the message insertpublic void appendRequestData(java.lang.StringBuffer message,
RequestData requestData,
java.lang.Object object,
java.lang.String prefix)
message - the message that is being built up for this eventrequestData - data field to be formattedobject - data to be formattedpublic void println(java.lang.String string)
string - string to outputpublic void print(java.lang.String args)
args - string to outputpublic static java.lang.String dumpToHex(byte[] bytes)
bytes - array to formatpublic static java.lang.String toHex(byte[] bytes)
bytes - array to formatpublic java.lang.String getSystemEnvironment()