com.sun.jts.trace
Class TraceRecordFormatter

java.lang.Object
  extended by com.sun.jts.trace.TraceRecordFormatter

public class TraceRecordFormatter
extends java.lang.Object

This class is used to format the trace record.

Version:
1.0
Author:
Kannan Srinivasan

Constructor Summary
TraceRecordFormatter()
           
 
Method Summary
static java.lang.String convertPropsToString(java.util.Properties prop)
          Helper method to convert properties to string.
static java.lang.String convertToString(byte[] byteArray)
          Helper method to convert a byte arror to string.
static java.lang.String convertXidArrayToString(Xid[] xidArray)
          Converts an array of xids to string that can be printed.
static java.lang.String createTraceRecord(java.lang.Object tid, java.lang.Object origin, java.lang.String message)
          Returns the formatted record, by accepting the simple string message, tid and originator, which can be written to OutputStream
static java.lang.String getTraceRecordScheme()
          Returns the scheme used to format the record.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TraceRecordFormatter

public TraceRecordFormatter()
Method Detail

createTraceRecord

public static java.lang.String createTraceRecord(java.lang.Object tid,
                                                 java.lang.Object origin,
                                                 java.lang.String message)
Returns the formatted record, by accepting the simple string message, tid and originator, which can be written to OutputStream

Parameters:
tid - an Object value
origin - an Object value
message - a String value
Returns:
a String value

getTraceRecordScheme

public static java.lang.String getTraceRecordScheme()
Returns the scheme used to format the record. This prints the different components (fields) of the trace and record and their order of occurrence.

Returns:
a String value

convertToString

public static java.lang.String convertToString(byte[] byteArray)
Helper method to convert a byte arror to string. This is typically used for printing Xids.

Parameters:
byteArray - a byte[] value
Returns:
a String value

convertXidArrayToString

public static java.lang.String convertXidArrayToString(Xid[] xidArray)
Converts an array of xids to string that can be printed. Its a helper method.

Parameters:
xidArray - a Xid[] value
Returns:
a String value

convertPropsToString

public static java.lang.String convertPropsToString(java.util.Properties prop)
Helper method to convert properties to string.

Parameters:
prop - a Properties value
Returns:
a String value


Copyright © 2012 GlassFish Community. All Rights Reserved.