org.sonatype.aether.util
Class DefaultRequestTrace

java.lang.Object
  extended by org.sonatype.aether.util.DefaultRequestTrace
All Implemented Interfaces:
RequestTrace

public class DefaultRequestTrace
extends Object
implements RequestTrace

A simple request trace.

Author:
Benjamin Bentmann

Constructor Summary
DefaultRequestTrace(Object data)
          Creates a new root trace with the specified data.
 
Method Summary
 Object getData()
           
 RequestTrace getParent()
           
 RequestTrace newChild(Object data)
           
static RequestTrace newChild(RequestTrace parent, Object data)
          Creates a child of the specified request trace.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultRequestTrace

public DefaultRequestTrace(Object data)
Creates a new root trace with the specified data.

Parameters:
data - The data to associate with the trace, may be null.
Method Detail

newChild

public static RequestTrace newChild(RequestTrace parent,
                                    Object data)
Creates a child of the specified request trace. This method is basically a convenience that will invoke RequestTrace.newChild(Object) when the specified parent trace is not null or otherwise instantiante a new root trace.

Parameters:
parent - The parent request trace, may be null.
data - The data to associate with the child trace, may be null.
Returns:
The child trace, never null.

getData

public Object getData()
Specified by:
getData in interface RequestTrace

getParent

public RequestTrace getParent()
Specified by:
getParent in interface RequestTrace

newChild

public RequestTrace newChild(Object data)
Specified by:
newChild in interface RequestTrace

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.