|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectjava.lang.Thread
patterntesting.runtime.log.AbstractLogger
public abstract class AbstractLogger
This is a common super class for all classes which do a kind of logging.
It provides an OutputStream and guarantees that this stream is
closed at least at shutdown.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
protected |
AbstractLogger(OutputStream ostream)
Instantiates a new abstract logger. |
| Method Summary | |
|---|---|
void |
close()
Closes the stream with the logged objects. |
protected static File |
createTempLogFile(String prefix,
String suffix)
Creates a file in the temp directory. |
protected OutputStream |
getLogStream()
Gets the log stream. |
protected static OutputStream |
getStreamFor(File logFile)
Gets the stream for the given log file. |
void |
run()
This method is called at shutdown to close the open stream. |
String |
toString()
To string. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractLogger(OutputStream ostream)
ostream - the ostream| Method Detail |
|---|
protected static File createTempLogFile(String prefix,
String suffix)
prefix + suffix is returned as result.
prefix - the prefixsuffix - the suffix
protected static OutputStream getStreamFor(File logFile)
logFile - the log file
protected final OutputStream getLogStream()
public void run()
run in interface Runnablerun in class ThreadThread.run()public void close()
public String toString()
toString in class ThreadObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||