org.eclipse.osgi.framework.debug
Class FrameworkDebugTraceEntry

java.lang.Object
  extended by org.eclipse.osgi.framework.debug.FrameworkDebugTraceEntry

public class FrameworkDebugTraceEntry
extends Object

A framework trace entry is a bean containing all of the attributes for a single trace message.


Field Summary
static String DEFAULT_OPTION_PATH
          If a bundles symbolic name is not specified then the default value of /debug can be used
 
Constructor Summary
FrameworkDebugTraceEntry(String bundleSymbolicName, String optionPath, String message, String traceClass)
          Construct a new FrameworkTraceRecord object
FrameworkDebugTraceEntry(String bundleSymbolicName, String optionPath, String message, Throwable error, String traceClass)
          Construct a new FrameworkTraceRecord object
 
Method Summary
 String getBundleSymbolicName()
          Accessor for the symbolic name of the bundle being traced
 String getClassName()
          Accessor for the name of the class being traced.
 int getLineNumber()
          Return the line number in the class/method where the trace originator
 String getMessage()
          Accessor for the trace message
 String getMethodName()
          Accessor for the method being traced.
 String getOptionPath()
          Accessor for the option-path being traced.
 String getThreadName()
          Accessor to the threads name
 Throwable getThrowable()
          Accessor for the trace exception.
 long getTimestamp()
          Accessor to the timestamp for this trace record
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_OPTION_PATH

public static final String DEFAULT_OPTION_PATH
If a bundles symbolic name is not specified then the default value of /debug can be used

See Also:
Constant Field Values
Constructor Detail

FrameworkDebugTraceEntry

public FrameworkDebugTraceEntry(String bundleSymbolicName,
                                String optionPath,
                                String message,
                                String traceClass)
Construct a new FrameworkTraceRecord object

Parameters:
bundleSymbolicName - The symbolic name of the bundle being traced
optionPath - The trace optionPath
message - The trace message
traceClass - The class that calls the trace API

FrameworkDebugTraceEntry

public FrameworkDebugTraceEntry(String bundleSymbolicName,
                                String optionPath,
                                String message,
                                Throwable error,
                                String traceClass)
Construct a new FrameworkTraceRecord object

Parameters:
bundleSymbolicName - The symbolic name of the bundle being traced
optionPath - The trace optionPath
message - The trace message
error - An exception to be traced
traceClass - The class that calls the trace API
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getThreadName

public final String getThreadName()
Accessor to the threads name

Returns:
the name of the thread

getTimestamp

public final long getTimestamp()
Accessor to the timestamp for this trace record

Returns:
the date

getBundleSymbolicName

public final String getBundleSymbolicName()
Accessor for the symbolic name of the bundle being traced

Returns:
The symbolic name of the bundle being traced

getMessage

public final String getMessage()
Accessor for the trace message

Returns:
the trace message

getThrowable

public final Throwable getThrowable()
Accessor for the trace exception. This may be null if there is no exception.

Returns:
the trace exception or null if none was defined.

getClassName

public final String getClassName()
Accessor for the name of the class being traced.

Returns:
The name of the class being traced.

getMethodName

public final String getMethodName()
Accessor for the method being traced.

Returns:
The name of the method being traced.

getOptionPath

public final String getOptionPath()
Accessor for the option-path being traced. The <option-path> part of the debug option string required for the Eclipse debugging framework.
    Examples:
       1) If a trace string com.ibm.myplugin.core/debug=true is specified then 'debug' is the option-path value.
       2) If a trace string com.ibm.myplugin.core/debug/perf=true is specified then 'debug/perf' is the option-path value.
 

Returns:
The option-path being traced.

getLineNumber

public final int getLineNumber()
Return the line number in the class/method where the trace originator

Returns:
The line number from the class and method where the trace request originated


Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.