frysk.util
Class StacktraceAction

java.lang.Object
  extended by frysk.util.StacktraceAction
All Implemented Interfaces:
Observer, ProcBlockObserver

public abstract class StacktraceAction
extends Object
implements ProcBlockObserver


Constructor Summary
StacktraceAction(PrintWriter printWriter, Proc theProc, Event theEvent, PrintDebugInfoStackOptions options)
          Runs a stacktrace on the given process.
 
Method Summary
 void addedTo(Object observable)
          Acknowledge the request to add this Observer from Object's set of observers was successful.
 void addFailed(Object observable, Throwable w)
          Notify that the attempt to add to the specified observer failed.
 void allExistingTasksCompleted()
          Called when all the tasks have been handled.
 void deletedFrom(Object observable)
          Acknowledge the request to delete this Observer from Object's set of observers was successful (or that the Observer was spontaneously deleted, e.g., due to a task exit).
 void existingTask(Task task)
          Called to deliver a list of existing tasks to the client.
 void flush()
           
 void taskAddFailed(Object observable, Throwable w)
          Called when attempting to bind to a specific task fails.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StacktraceAction

public StacktraceAction(PrintWriter printWriter,
                        Proc theProc,
                        Event theEvent,
                        PrintDebugInfoStackOptions options)
Runs a stacktrace on the given process.

Parameters:
theProc - the process to run the stack trace on.
theEvent - an event to run on completion of the stack trace. For example: Stop the eventLoop and exit the program.
numberOfFrames - number of frames to print pass value <=0 to print all frames.
elfOnly - if true print an elf only stack back trace not referring to any stack debug information. Otherwise, print a rich stack trace using debug information.
printParameters - this is only valid if elfOnly is false. If this option is true then the parameters of each function are printed.
printScopes - this is only valid if elfOnly is false. If this is true the scopes of the function and their respective variables are printed
fullpath - this is only valid if elfOnly is false. If this is true the entire file path is printed other wise only the name of the file is printed.
Throws:
ProcException
Method Detail

addedTo

public void addedTo(Object observable)
Description copied from interface: Observer
Acknowledge the request to add this Observer from Object's set of observers was successful.

Specified by:
addedTo in interface Observer

addFailed

public void addFailed(Object observable,
                      Throwable w)
Description copied from interface: Observer
Notify that the attempt to add to the specified observer failed.

Specified by:
addFailed in interface Observer

deletedFrom

public void deletedFrom(Object observable)
Description copied from interface: Observer
Acknowledge the request to delete this Observer from Object's set of observers was successful (or that the Observer was spontaneously deleted, e.g., due to a task exit).

Specified by:
deletedFrom in interface Observer

existingTask

public final void existingTask(Task task)
Description copied from interface: ProcBlockObserver
Called to deliver a list of existing tasks to the client.

Specified by:
existingTask in interface ProcBlockObserver

taskAddFailed

public void taskAddFailed(Object observable,
                          Throwable w)
Description copied from interface: ProcBlockObserver
Called when attempting to bind to a specific task fails.

Specified by:
taskAddFailed in interface ProcBlockObserver

flush

public void flush()

allExistingTasksCompleted

public void allExistingTasksCompleted()
Description copied from interface: ProcBlockObserver
Called when all the tasks have been handled.

Specified by:
allExistingTasksCompleted in interface ProcBlockObserver