xmlBlaster 2.1.0 API

org.xmlBlaster.util
Class ThreadUtility

java.lang.Object
  extended by org.xmlBlaster.util.ThreadUtility

public class ThreadUtility
extends java.lang.Object

Reads and compares two files containing stack traces. Output are only such stack traces which did not change (which are the same in both) ThreadUtility

Author:
Michele Laghi

Field Summary
private  boolean daemon
           
private  java.lang.String head
           
private  java.lang.String lwpId
           
private  java.lang.String name
           
private  java.lang.String nId
           
private  int prio
           
private  java.lang.String[] stack
           
private  java.lang.String tail
           
private  java.lang.String threadId
           
 
Constructor Summary
ThreadUtility()
           
 
Method Summary
private static java.lang.String afterEquality(java.lang.String txt)
           
static java.lang.String dumpUnchangedThreads(java.lang.String file1, java.lang.String file2)
           
 java.lang.String getHead()
           
 java.lang.String getLwpId()
           
 java.lang.String getName()
           
private static java.lang.String getNextToken(java.util.StringTokenizer tokenizer)
           
 java.lang.String getNId()
           
 int getPrio()
           
 java.lang.String[] getStack()
           
 java.lang.String getTail()
           
private static java.lang.String getTail(java.util.StringTokenizer tokenizer)
           
 java.lang.String getThreadId()
           
static java.util.Map getThreads(java.io.Reader reader)
          Returns key/values where the key is the threadId and the value is the ThreadUtility object.
 boolean isDaemon()
           
static boolean isHead(java.lang.String line)
           
private  boolean isUnchanged(ThreadUtility other)
           
static void main(java.lang.String[] args)
           
 void setHead(java.lang.String head)
           
 void setStack(java.lang.String[] stack)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private java.lang.String name

daemon

private boolean daemon

prio

private int prio

threadId

private java.lang.String threadId

nId

private java.lang.String nId

lwpId

private java.lang.String lwpId

tail

private java.lang.String tail

head

private java.lang.String head

stack

private java.lang.String[] stack
Constructor Detail

ThreadUtility

public ThreadUtility()
Method Detail

getNextToken

private static final java.lang.String getNextToken(java.util.StringTokenizer tokenizer)

getTail

private static final java.lang.String getTail(java.util.StringTokenizer tokenizer)

afterEquality

private static final java.lang.String afterEquality(java.lang.String txt)

isHead

public static final boolean isHead(java.lang.String line)

getThreads

public static java.util.Map getThreads(java.io.Reader reader)
                                throws java.io.IOException
Returns key/values where the key is the threadId and the value is the ThreadUtility object. Never returns null.

Parameters:
reader -
Returns:
Throws:
java.io.IOException

dumpUnchangedThreads

public static java.lang.String dumpUnchangedThreads(java.lang.String file1,
                                                    java.lang.String file2)
                                             throws java.io.IOException
Throws:
java.io.IOException

isUnchanged

private boolean isUnchanged(ThreadUtility other)

setHead

public void setHead(java.lang.String head)

getHead

public java.lang.String getHead()

isDaemon

public boolean isDaemon()

getLwpId

public java.lang.String getLwpId()

getName

public java.lang.String getName()

getNId

public java.lang.String getNId()

getPrio

public int getPrio()

getTail

public java.lang.String getTail()

getStack

public java.lang.String[] getStack()

setStack

public void setStack(java.lang.String[] stack)

getThreadId

public java.lang.String getThreadId()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] args)

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.