|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mulesoft.adapter.ra.XITrace
public class XITrace
Basic XITrace wrapper class for the new AdapterFramework, which
will make the usage of SAP J2EE standard logging and tracing more convenient and
consistent throughout the sample adapter.
(ra implementation specific)
| Field Summary | |
|---|---|
protected com.sap.tc.logging.Location |
location
|
static int |
SEVERITY_ALL
|
static int |
SEVERITY_DEBUG
|
static int |
SEVERITY_ERROR
|
static int |
SEVERITY_FATAL
|
static int |
SEVERITY_GROUP
|
static int |
SEVERITY_INFO
|
static int |
SEVERITY_MAX
|
static int |
SEVERITY_MIN
|
static int |
SEVERITY_NONE
|
static int |
SEVERITY_PATH
|
static int |
SEVERITY_WARNING
|
protected static boolean |
tracing
|
| Constructor Summary | |
|---|---|
XITrace(String className)
Constructor for trace utility class |
|
| Method Summary | |
|---|---|
void |
assertion(String signature,
com.sap.tc.logging.Category category,
boolean assertion,
String msg)
Writes an error trace message if a given condition is false. |
boolean |
beLogged(int severity)
This method can be used to avoid unneccessary and unperformant object creation, in cases where debugging is switched off, or the serverity level is lower than the current one. |
void |
catching(String signature,
Throwable t)
Writes a trace entry that the specified throwable was caught. |
void |
debugT(String signature,
com.sap.tc.logging.Category category,
String msg)
Writes a debug trace and log message. |
void |
debugT(String signature,
com.sap.tc.logging.Category category,
String msg,
Object[] args)
Writes a debug trace and log message. |
void |
debugT(String signature,
String msg)
Writes a debug trace message. |
void |
debugT(String signature,
String msg,
Object[] args)
Writes a debug trace message. |
void |
entering(String signature)
Writes a trace entry that the specified method was entered. |
void |
entering(String signature,
Object[] args)
Writes a trace entry that the specified method was entered. |
void |
errorT(String signature,
com.sap.tc.logging.Category category,
String msg)
Writes an error trace and log message. |
void |
errorT(String signature,
com.sap.tc.logging.Category category,
String msg,
Object[] args)
Writes an error trace and log message. |
void |
errorT(String SIGNATURE,
com.sap.tc.logging.Category category,
String messageID,
String msg)
Writes an error trace and log message. |
void |
errorT(String SIGNATURE,
com.sap.tc.logging.Category category,
String messageID,
String msg,
Object... args)
Writes an error trace and log message. |
void |
errorT(String signature,
String msg)
Writes an error trace message. |
void |
errorT(String signature,
String msg,
Object[] args)
Writes an error trace and log message. |
void |
errorT(String SIGNATURE,
String messageID,
String msg)
Writes an error trace message. |
void |
errorT(String SIGNATURE,
String messageID,
String msg,
Object... args)
Writes an error trace and log message. |
void |
exiting(String signature)
Writes a trace entry that the specified method is about to be exited. |
void |
exiting(String signature,
Object res)
Writes a trace entry that the specified method is about to be exited. |
void |
fatalT(String signature,
com.sap.tc.logging.Category category,
String msg)
Writes a fatal trace and log message. |
void |
fatalT(String signature,
com.sap.tc.logging.Category category,
String msg,
Object[] args)
Writes a fatal trace and log message. |
void |
fatalT(String SIGNATURE,
com.sap.tc.logging.Category category,
String messageID,
String msg)
Writes a fatal trace and log message. |
void |
fatalT(String SIGNATURE,
com.sap.tc.logging.Category category,
String messageID,
String msg,
Object... args)
Writes a fatal trace and log message. |
void |
fatalT(String signature,
String msg)
Writes a fatal trace message. |
void |
fatalT(String signature,
String msg,
Object[] args)
Writes a fatal trace message. |
void |
fatalT(String SIGNATURE,
String messageID,
String msg)
Writes a fatal trace message. |
void |
fatalT(String SIGNATURE,
String messageID,
String msg,
Object... args)
Writes a fatal trace message. |
void |
infoT(String signature,
com.sap.tc.logging.Category category,
String msg)
Writes an info trace and log message. |
void |
infoT(String signature,
com.sap.tc.logging.Category category,
String msg,
Object[] args)
Writes an info trace and log message. |
void |
infoT(String signature,
String msg)
Writes an info trace message. |
void |
infoT(String signature,
String msg,
Object[] args)
Writes an info trace message. |
void |
throwing(String signature,
Throwable t)
Writes a trace entry that the specified throwable is about to be thrown. |
String |
toString()
|
void |
warningT(String signature,
com.sap.tc.logging.Category category,
String msg)
Writes an warning trace and log message. |
void |
warningT(String signature,
com.sap.tc.logging.Category category,
String msg,
Object[] args)
Writes a warning trace and log message. |
void |
warningT(String signature,
String msg)
Writes a warning trace message. |
void |
warningT(String signature,
String msg,
Object[] args)
Writes a warning trace message. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected com.sap.tc.logging.Location location
protected static boolean tracing
public static final int SEVERITY_ALL
public static final int SEVERITY_DEBUG
public static final int SEVERITY_ERROR
public static final int SEVERITY_FATAL
public static final int SEVERITY_GROUP
public static final int SEVERITY_INFO
public static final int SEVERITY_MAX
public static final int SEVERITY_MIN
public static final int SEVERITY_NONE
public static final int SEVERITY_PATH
public static final int SEVERITY_WARNING
| Constructor Detail |
|---|
public XITrace(String className)
className: - Name of the class that uses this trace utility, usually this.getClass().getName()| Method Detail |
|---|
public String toString()
toString in class Objectpublic void entering(String signature)
signature - Signature of the method
public void entering(String signature,
Object[] args)
signature - Signature of the methodargs - Arguments as object referencespublic void exiting(String signature)
signature - Signature of the method
public void exiting(String signature,
Object res)
signature - Signature of the methodres - Result as object references
public void throwing(String signature,
Throwable t)
signature - Signature of the methodt - Throwable
public void catching(String signature,
Throwable t)
signature - Signature of the methodt - Throwable
public void debugT(String signature,
com.sap.tc.logging.Category category,
String msg)
signature - Signature of the methodcategory - Category of the tracemsg - Can have placeholders of java.text.MessageFormat syntax,
in the form of { } to be substituted by the
respective arguments
public void debugT(String signature,
String msg)
signature - Signature of the methodmsg - Debug message text
public void debugT(String signature,
com.sap.tc.logging.Category category,
String msg,
Object[] args)
signature - Signature of the methodcategory - Category of the tracemsg - Can have placeholders of java.text.MessageFormat syntax,
in the form of { } to be substituted by the
argumentsargs - Can be single argument but also array of arguments. For
collections, their method toArray is used.
public void debugT(String signature,
String msg,
Object[] args)
signature - Signature of the methodmsg - Can have placeholders of java.text.MessageFormat syntax in the
form of { } to be substituted by the arguments.args - Can be single argument but also array of arguments. For
collections, their method toArray is used.
public void infoT(String signature,
com.sap.tc.logging.Category category,
String msg)
signature - Signature of the methodcategory - Category of the tracemsg - Can have placeholders of java.text.MessageFormat syntax,
in the form of { } to be substituted by the
respective arguments
public void infoT(String signature,
String msg)
signature - Signature of the methodmsg - Info message text
public void infoT(String signature,
com.sap.tc.logging.Category category,
String msg,
Object[] args)
signature - Signature of the methodcategory - Category of the tracemsg - Can have placeholders of java.text.MessageFormat syntax,
in the form of { } to be substituted by the
respective argumentsargs - Can be single argument but also array of arguments. For
collections, their method toArray is used.
public void infoT(String signature,
String msg,
Object[] args)
signature - Signature of the methodmsg - Can have placeholders of java.text.MessageFormat syntax in the
form of { } to be substituted by the arguments.args - Can be single argument but also array of arguments. For
collections, their method toArray is used.
public void warningT(String signature,
com.sap.tc.logging.Category category,
String msg)
signature - Signature of the methodcategory - Category of the tracemsg - Can have placeholders of java.text.MessageFormat syntax,
in the form of { } to be substituted by the
respective arguments
public void warningT(String signature,
String msg)
signature - Signature of the methodmsg - Warning message text
public void warningT(String signature,
com.sap.tc.logging.Category category,
String msg,
Object[] args)
signature - Signature of the methodcategory - Category of the tracemsg - Can have placeholders of java.text.MessageFormat syntax,
in the form of { } to be substituted by the
respective argumentsargs - Can be single argument but also array of arguments. For
collections, their method toArray is used.
public void warningT(String signature,
String msg,
Object[] args)
signature - Signature of the methodmsg - Can have placeholders of java.text.MessageFormat syntax in the
form of { } to be substituted by the arguments.args - Can be single argument but also array of arguments. For
collections, their method toArray is used.
public void errorT(String signature,
com.sap.tc.logging.Category category,
String msg)
signature - Signature of the methodcategory - Category of the tracemsg - Can have placeholders of java.text.MessageFormat syntax,
in the form of { } to be substituted by the
respective arguments
public void errorT(String signature,
String msg)
signature - Signature of the methodcategory - Category of the tracemsg - Can have placeholders of java.text.MessageFormat syntax,
in the form of { } to be substituted by the
respective arguments
public void errorT(String signature,
com.sap.tc.logging.Category category,
String msg,
Object[] args)
signature - Signature of the methodcategory - Category of the tracemsg - Can have placeholders of java.text.MessageFormat syntax,
in the form of { } to be substituted by the
respective argumentsargs - Can be single argument but also array of arguments. For
collections, their method toArray is used.
public void errorT(String signature,
String msg,
Object[] args)
signature - Signature of the methodcategory - Category of the tracemsg - Can have placeholders of java.text.MessageFormat syntax,
in the form of { } to be substituted by the
respective argumentsargs - Can be single argument but also array of arguments. For
collections, their method toArray is used.
public void fatalT(String signature,
com.sap.tc.logging.Category category,
String msg)
signature - Signature of the methodcategory - Category of the tracemsg - Can have placeholders of java.text.MessageFormat syntax,
in the form of { } to be substituted by the
respective arguments
public void fatalT(String signature,
String msg)
signature - Signature of the methodcategory - Category of the tracemsg - Can have placeholders of java.text.MessageFormat syntax,
in the form of { } to be substituted by the
respective arguments
public void fatalT(String signature,
com.sap.tc.logging.Category category,
String msg,
Object[] args)
signature - Signature of the methodcategory - Category of the tracemsg - Can have placeholders of java.text.MessageFormat syntax,
in the form of { } to be substituted by the
respective argumentsargs - Can be single argument but also array of arguments. For
collections, their method toArray is used.
public void fatalT(String signature,
String msg,
Object[] args)
signature - Signature of the methodcategory - Category of the tracemsg - Can have placeholders of java.text.MessageFormat syntax,
in the form of { } to be substituted by the
respective argumentsargs - Can be single argument but also array of arguments. For
collections, their method toArray is used.
public void assertion(String signature,
com.sap.tc.logging.Category category,
boolean assertion,
String msg)
signature - Signature of the methodcategory - Category of the traceassertion - A true or false condition to be evaluatedmsg - Can have placeholders of java.text.MessageFormat syntax,
in the form of { } to be substituted by the
respective argumentspublic boolean beLogged(int severity)
This method can be used to avoid unneccessary and unperformant object creation, in cases where debugging is switched off, or the serverity level is lower than the current one. In such cases the parameter object array will still be created and passed into the logging/tracing methods, without beeing used/logged at all.
This method is to be used, if huge byte arrays or streams are being
traced. For small objects which implement the toString method it shouldn't
be neccessary, to call this method. We suggest the following usage:
TRACE.infoT(SIGNATURE, Categories.SYSTEM, "Message bytes: {0} ",
TRACE.beLogged(TRACE.SEVERITY_INFO) ?
new Object [] {new String(message.getBytes())} :
null);
severity - One of the severity constants in the
Trace wrapper class.
public void errorT(String SIGNATURE,
com.sap.tc.logging.Category category,
String messageID,
String msg)
SIGNATURE - Signature of the methodcategory - Category of the tracemessageID - Unique Message IDmsg - Can have placeholders of java.text.MessageFormat syntax, in the form of { } to be
substituted by the respective arguments
public void errorT(String SIGNATURE,
String messageID,
String msg)
SIGNATURE - Signature of the methodmessageID - Unique Message IDmsg - Can have placeholders of java.text.MessageFormat syntax, in the form of { } to be
substituted by the respective arguments
public void errorT(String SIGNATURE,
com.sap.tc.logging.Category category,
String messageID,
String msg,
Object... args)
SIGNATURE - Signature of the methodcategory - Category of the tracemessageID - Unique Message IDmsg - Can have placeholders of java.text.MessageFormat syntax, in the form of { } to be
substituted by the respective argumentsargs - Can be single argument but also array of arguments. For collections, their method toArray is used.
public void errorT(String SIGNATURE,
String messageID,
String msg,
Object... args)
SIGNATURE - Signature of the methodmessageID - Unique Message IDmsg - Can have placeholders of java.text.MessageFormat syntax, in the form of { } to be
substituted by the respective argumentsargs - Can be single argument but also array of arguments. For collections, their method toArray is used.
public void fatalT(String SIGNATURE,
com.sap.tc.logging.Category category,
String messageID,
String msg)
SIGNATURE - Signature of the methodcategory - Category of the tracemessageID - Unique Message IDmsg - Can have placeholders of java.text.MessageFormat syntax, in the form of { } to be
substituted by the respective arguments
public void fatalT(String SIGNATURE,
String messageID,
String msg)
SIGNATURE - Signature of the methodmessageID - Unique Message IDmsg - Can have placeholders of java.text.MessageFormat syntax, in the form of { } to be
substituted by the respective arguments
public void fatalT(String SIGNATURE,
com.sap.tc.logging.Category category,
String messageID,
String msg,
Object... args)
SIGNATURE - Signature of the methodcategory - Category of the tracemessageID - Unique Message IDmsg - Can have placeholders of java.text.MessageFormat syntax, in the form of { } to be
substituted by the respective argumentsargs - Can be single argument but also array of arguments. For collections, their method toArray is used.
public void fatalT(String SIGNATURE,
String messageID,
String msg,
Object... args)
SIGNATURE - Signature of the methodmessageID - Unique Message IDmsg - Can have placeholders of java.text.MessageFormat syntax, in the form of { } to be
substituted by the respective argumentsargs - Can be single argument but also array of arguments. For collections, their method toArray is used.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||