Top Methods
org.jboss.logmanager

public Interface NDCProvider

Known Direct Implementers
org.jboss.logmanager.ThreadLocalNDC

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Clear the thread's NDC stack.

public String

Returns:

the current NDC value, or "" if there is none
get
()

Get the current NDC value.

public String

Returns:

the value or null if there is none
get
(int
the index
n
)

Provided for compatibility with log4j.

public int

Returns:

the stack depth
getDepth
()

Get the current NDC stack depth.

public String

Returns:

the old topmost value
pop
()

Pop the topmost value from the NDC stack and return it.

public int

Returns:

the new stack depth
push
(String
the new value
context
)

Push a value on to the NDC stack, returning the new stack depth which should later be used to restore the stack.

public void
trimTo(int
the new size
size
)

Trim the thread NDC stack down to no larger than the given size.

Method Detail

clearback to summary
public void clear()

Clear the thread's NDC stack.

getback to summary
public String get()

Get the current NDC value.

Returns:String

the current NDC value, or "" if there is none

getback to summary
public String get(int n)

Provided for compatibility with log4j. Get the NDC value that is n entries from the bottom.

Parameters
n:int

the index

Returns:String

the value or null if there is none

getDepthback to summary
public int getDepth()

Get the current NDC stack depth.

Returns:int

the stack depth

popback to summary
public String pop()

Pop the topmost value from the NDC stack and return it.

Returns:String

the old topmost value

pushback to summary
public int push(String context)

Push a value on to the NDC stack, returning the new stack depth which should later be used to restore the stack.

Parameters
context:String

the new value

Returns:int

the new stack depth

trimToback to summary
public void trimTo(int size)

Trim the thread NDC stack down to no larger than the given size. Used to restore the stack to the depth returned by a push().

Parameters
size:int

the new size