Top Constructors Methods
org.jboss.logging

public final Class NDC

extends Object
Class Inheritance

Constructor Summary

AccessConstructor and Description
private
NDC()

Method Summary

Modifier and TypeMethod and Description
public static void
clear()

Clears the nested diagnostics context.

public static String

Returns:

the current value set or null if no value was set
get
()

Retrieves the current values set for the nested diagnostics context.

public static int

Returns:

the current depth of the stack
getDepth
()

The current depth of the nested diagnostics context.

public static String

Returns:

the value or an empty string
peek
()

Peeks at the top value from the stack and returns it.

public static String

Returns:

the top value from the stack or an empty string if no value was set
pop
()

Pops top value from the stack and returns it.

public static void
push(String
the message to push
message
)

Pushes a value to the nested diagnostics context stack.

public static void
setMaxDepth(int
the maximum depth to set
maxDepth
)

Sets maximum depth of the stack removing any entries below the maximum depth.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NDCback to summary
private NDC()

Method Detail

clearback to summary
public static void clear()

Clears the nested diagnostics context.

getback to summary
public static String get()

Retrieves the current values set for the nested diagnostics context.

Returns:String

the current value set or null if no value was set

getDepthback to summary
public static int getDepth()

The current depth of the nested diagnostics context.

Returns:int

the current depth of the stack

peekback to summary
public static String peek()

Peeks at the top value from the stack and returns it.

Returns:String

the value or an empty string

popback to summary
public static String pop()

Pops top value from the stack and returns it.

Returns:String

the top value from the stack or an empty string if no value was set

pushback to summary
public static void push(String message)

Pushes a value to the nested diagnostics context stack.

Parameters
message:String

the message to push

setMaxDepthback to summary
public static void setMaxDepth(int maxDepth)

Sets maximum depth of the stack removing any entries below the maximum depth.

Parameters
maxDepth:int

the maximum depth to set