Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add possibility to define ExternalListener
- Loading branch information
Showing
3 changed files
with
52 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/org/kohsuke/file_leak_detector/ExternalListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.kohsuke.file_leak_detector; | ||
|
||
import java.io.File; | ||
|
||
/** | ||
* | ||
* Allows external listeners for the open file and open socket events. | ||
* | ||
* @author Michal Linhard (michal@linhard.sk) | ||
*/ | ||
public interface ExternalListener { | ||
/** | ||
* | ||
* Called when a new file is opened. | ||
* | ||
* @param obj | ||
* @param file | ||
*/ | ||
void open(Object obj, File file); | ||
|
||
/** | ||
* | ||
* Called when a new socket is opened. | ||
* | ||
* @param obj | ||
*/ | ||
void openSocket(Object obj); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters