SLF4J API
Version 1.4.3

org.slf4j
Interface Marker

All Superinterfaces:
Serializable
All Known Implementing Classes:
BasicMarker

public interface Marker
extends Serializable

Markers are named objects used to enrich log statements. Conforming logging system Implementations of SLF4J determine how information conveyed by markers are used, if at all. In particular, many conforming logging systems ignore marker data.

Markers can contain child markers, which in turn can contain children of their own.

Author:
Ceki Gülcü

Field Summary
static String ANY_MARKER
          This constant represents any marker, including a null marker.
static String ANY_NON_NULL_MARKER
          This constant represents any non-null marker.
 
Method Summary
 void add(Marker child)
          Add a child Marker to this Marker.
 boolean contains(Marker other)
          Does this marker contain the 'other' marker? Marker A is defined to contain marker B, if A == B or if B is a child of A.
 boolean contains(String name)
          Does this marker contain the marker named 'name'? If 'name' is null the returned value is always false.
 String getName()
          Get the name of this Marker.
 boolean hasChildren()
          Does this marker have children?
 Iterator iterator()
          Returns an Iterator which can be used to iterate over the children of this marker.
 boolean remove(Marker child)
          Remove a child Marker.
 

Field Detail

ANY_MARKER

static final String ANY_MARKER
This constant represents any marker, including a null marker.

See Also:
Constant Field Values

ANY_NON_NULL_MARKER

static final String ANY_NON_NULL_MARKER
This constant represents any non-null marker.

See Also:
Constant Field Values
Method Detail

getName

String getName()
Get the name of this Marker.

Returns:
name of marker

add

void add(Marker child)
Add a child Marker to this Marker.

Parameters:
child - a child marker

remove

boolean remove(Marker child)
Remove a child Marker.

Parameters:
child - the child Marker to remove
Returns:
true if child could be found and removed, false otherwise.

hasChildren

boolean hasChildren()
Does this marker have children?

Returns:
true if this marker has children, false otherwise.

iterator

Iterator iterator()
Returns an Iterator which can be used to iterate over the children of this marker. An empty iterator is returned when this marker has no children.

Returns:
Iterator over the children of this marker

contains

boolean contains(Marker other)
Does this marker contain the 'other' marker? Marker A is defined to contain marker B, if A == B or if B is a child of A.

Parameters:
other - The marker to test for inclusion.
Returns:
Whether this marker contains the other marker.
Throws:
IllegalArgumentException - if 'other' is null

contains

boolean contains(String name)
Does this marker contain the marker named 'name'? If 'name' is null the returned value is always false.

Parameters:
other - The marker to test for inclusion.
Returns:
Whether this marker contains the other marker.

SLF4J API
Version 1.4.3

Copyright © 2005-2008 QOS.ch. All Rights Reserved.