Sonic ESB API

com.sonicsw.esb.service.common
Class SFCDiagnosticContext

java.lang.Object
  extended by com.sonicsw.esb.service.common.SFCDiagnosticContext

public class SFCDiagnosticContext
extends java.lang.Object

A DiagnosticContext captures context properties associated with the current thread of execution. This context information can be used for logging, generating MF notifications, and so on.

This class provides methods to add and remove the current context properties from the log4j mapped diagnostic context. The MDC maintains a thread-local map of name/value pairs that can be included in the log output when using a pattern layout.


Constructor Summary
SFCDiagnosticContext()
           
 
Method Summary
static java.util.Map asMap()
           
static java.util.Properties get()
           
static java.util.Properties remove()
           
static java.util.Properties set(java.util.Properties props)
           
static void writeToLog()
          Writes the contents of this diagnostic context to the given logger at the specified log level.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SFCDiagnosticContext

public SFCDiagnosticContext()
Method Detail

set

public static java.util.Properties set(java.util.Properties props)

get

public static java.util.Properties get()

remove

public static java.util.Properties remove()

asMap

public static java.util.Map asMap()

writeToLog

public static void writeToLog()
Writes the contents of this diagnostic context to the given logger at the specified log level.


Sonic ESB API

Copyright © 2001-2012 Progress Software Corporation. All Rights Reserved.
HTML formatted on 13-Mar-2012.