public class Listener extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Listener.FileRecord
Record of opened file.
|
static class |
Listener.Record
Remembers who/where/when opened a file.
|
static class |
Listener.ServerSocketRecord
Record of opened server socket.
|
static class |
Listener.SocketChannelRecord
Record of opened SocketChannel.
|
static class |
Listener.SocketRecord
Record of opened socket.
|
| Modifier and Type | Field and Description |
|---|---|
static PrintWriter |
ERROR
Trace the "too many open files" error here
|
static int |
THRESHOLD
If the table size grows beyond this, report the table
|
static PrintWriter |
TRACE
Trace the open/close op
|
| Constructor and Description |
|---|
Listener() |
| Modifier and Type | Method and Description |
|---|---|
static void |
close(Object _this)
Called when a file is closed.
|
static void |
dump(OutputStream out)
Dumps all files that are currently open.
|
static void |
dump(Writer w) |
static List<Listener.Record> |
getCurrentOpenFiles() |
static boolean |
isAgentInstalled()
Returns true if the leak detector agent is running.
|
static void |
makeStrong() |
static void |
open(Object _this,
File f)
Called when a new file is opened.
|
static void |
openSocket(Object _this)
Called when a socket is opened.
|
static void |
outOfDescriptors()
Called when the system has too many open files.
|
public static PrintWriter TRACE
public static PrintWriter ERROR
public static int THRESHOLD
public static boolean isAgentInstalled()
public static void makeStrong()
public static void open(Object _this, File f)
_this - FileInputStream, FileOutputStream, RandomAccessFile, or ZipFile.f - File being opened.public static void openSocket(Object _this)
public static List<Listener.Record> getCurrentOpenFiles()
public static void close(Object _this)
_this - FileInputStream, FileOutputStream, RandomAccessFile, Socket, ServerSocket, or ZipFile.public static void dump(OutputStream out)
public static void dump(Writer w)
public static void outOfDescriptors()
Copyright © 2013. All rights reserved.