org.kohsuke.file_leak_detecter
Class Listener

java.lang.Object
  extended by org.kohsuke.file_leak_detecter.Listener

public class Listener
extends java.lang.Object

Intercepted JDK calls land here.

Author:
Kohsuke Kawaguchi

Field Summary
static java.io.PrintStream ERROR
          Trace the "too many open files" error here
static java.io.PrintStream TRACE
          Trace the open/close op
 
Constructor Summary
Listener()
           
 
Method Summary
static void close(java.lang.Object _this)
          Called when a file is closed.
static void dump(java.io.PrintStream ps)
          Dumps all files that are currently open.
static void open(java.lang.Object _this, java.io.File f)
          Called when a new file is opened.
static void outOfDescriptors()
          Called when the system has too many open files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRACE

public static java.io.PrintStream TRACE
Trace the open/close op


ERROR

public static java.io.PrintStream ERROR
Trace the "too many open files" error here

Constructor Detail

Listener

public Listener()
Method Detail

open

public static void open(java.lang.Object _this,
                        java.io.File f)
Called when a new file is opened.

Parameters:
_this - FileInputStream, FileOutputStream, or RandomAccessFile.
f - File being opened.

close

public static void close(java.lang.Object _this)
Called when a file is closed.

Parameters:
_this - FileInputStream, FileOutputStream, or RandomAccessFile.

dump

public static void dump(java.io.PrintStream ps)
Dumps all files that are currently open.


outOfDescriptors

public static void outOfDescriptors()
Called when the system has too many open files.



Copyright © 2008. All Rights Reserved.