X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Ffcp%2FFcpListenerManager.java;h=7969da164726380c2583b96342b757ce8da6fcea;hb=317bb21d6c9d43795f026f97709a7e67acf6f751;hp=a312ec66a6268c23293408c0270e911f797b9c3b;hpb=02ce5e0a4f8d64f90131201603b94495d27c1cc0;p=jFCPlib.git diff --git a/src/main/java/net/pterodactylus/fcp/FcpListenerManager.java b/src/main/java/net/pterodactylus/fcp/FcpListenerManager.java index a312ec6..7969da1 100644 --- a/src/main/java/net/pterodactylus/fcp/FcpListenerManager.java +++ b/src/main/java/net/pterodactylus/fcp/FcpListenerManager.java @@ -18,14 +18,18 @@ package net.pterodactylus.fcp; -import net.pterodactylus.util.event.AbstractListenerManager; +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; /** * Manages FCP listeners and event firing. * * @author David ‘Bombe’ Roden <bombe@pterodactylus.net> */ -public class FcpListenerManager extends AbstractListenerManager { +public class FcpListenerManager { + + private final FcpConnection source; + private final List listeners = new CopyOnWriteArrayList(); /** * Creates a new listener manager. @@ -34,7 +38,23 @@ public class FcpListenerManager extends AbstractListenerManager getListeners() { + return listeners; } /** @@ -291,7 +311,8 @@ public class FcpListenerManager extends AbstractListenerManagernull - * if there was no exception + * The exception that caused the disconnect, or + * null if there was no exception * @see FcpListener#connectionClosed(FcpConnection, Throwable) */ public void fireConnectionClosed(Throwable throwable) {