diff --git a/src/main/java/com/github/kokorin/jaffree/process/ProcessListener.java b/src/main/java/com/github/kokorin/jaffree/process/ProcessListener.java index 1a219271..279009cb 100644 --- a/src/main/java/com/github/kokorin/jaffree/process/ProcessListener.java +++ b/src/main/java/com/github/kokorin/jaffree/process/ProcessListener.java @@ -8,8 +8,17 @@ * @author Speiger */ public interface ProcessListener { - public void onStart(Process process); - public void onStop(Process process); + /** + * Provides the Process instance that was started + * @param process the process + */ + void onStart(Process process); + + /** + * Provides the Process instance that was just completed + * @param process the process + */ + void onStop(Process process); /** * Simple tracker wrapper that allows to track all instances being loaded. @@ -17,7 +26,7 @@ public interface ProcessListener { * @param instances Set. Highly Suggest {@link Collections#newSetFromMap} using a {@link ConcurrentHashMap} for multithreading support * @return ProcessListener wrapper */ - public static ProcessListener of(Set instances) { + static ProcessListener of(Set instances) { return new Impl(instances); } @@ -27,12 +36,12 @@ static class Impl implements ProcessListener { public Impl(Set instances) { this.instances = instances; } - + @Override public void onStart(Process process) { instances.add(process); } - + @Override public void onStop(Process process) { instances.remove(process);