X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Ffcp%2Fhighlevel%2FFcpClient.java;h=3012e0011c1fc9b262921c3190b6ba2e5162fc5f;hb=dd605aee444057a874fabf7fb0045b8448b0d1cd;hp=f2a80a16470c6cd6e82acc4fd764952866cd1fbc;hpb=ff012b8b8f162b1d2f9f471455f43545d63f7d4a;p=jFCPlib.git diff --git a/src/net/pterodactylus/fcp/highlevel/FcpClient.java b/src/net/pterodactylus/fcp/highlevel/FcpClient.java index f2a80a1..3012e00 100644 --- a/src/net/pterodactylus/fcp/highlevel/FcpClient.java +++ b/src/net/pterodactylus/fcp/highlevel/FcpClient.java @@ -1,6 +1,5 @@ /* - * jFCPlib - FcpClient.java - - * Copyright © 2009 David Roden + * jFCPlib - FcpClient.java - Copyright © 2009 David Roden * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -168,6 +167,7 @@ public class FcpClient { @Override @SuppressWarnings("synthetic-access") public void connectionClosed(FcpConnection fcpConnection, Throwable throwable) { + connected = false; fcpClientListenerManager.fireFcpClientDisconnected(); } }); @@ -178,6 +178,26 @@ public class FcpClient { // /** + * Adds an FCP listener to the underlying connection. + * + * @param fcpListener + * The FCP listener to add + */ + public void addFcpListener(FcpListener fcpListener) { + fcpConnection.addFcpListener(fcpListener); + } + + /** + * Removes an FCP listener from the underlying connection. + * + * @param fcpListener + * The FCP listener to remove + */ + public void removeFcpListener(FcpListener fcpListener) { + fcpConnection.removeFcpListener(fcpListener); + } + + /** * Adds an FCP client listener to the list of registered listeners. * * @param fcpClientListener