Переглянути джерело

Add quit method to Parser

Change-Id: Ib1038c0d46b0c1f2de15050bb772fe519417d7bd
Reviewed-on: http://gerrit.dmdirc.com/2534
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Shane Mc Cormack <shane@dmdirc.com>
tags/0.7rc1
Greg Holmes 11 роки тому
джерело
коміт
8e107225be

+ 6
- 0
src/com/dmdirc/parser/common/BaseParser.java Переглянути файл

@@ -89,6 +89,12 @@ public abstract class BaseParser extends ThreadedParser {
89 89
         this.callbackManager = new CallbackManager(this, implementations);
90 90
     }
91 91
 
92
+    /** {@inheritDoc} */
93
+    @Override
94
+    public void quit(final String reason) {
95
+        disconnect(reason);
96
+    }
97
+
92 98
     /** {@inheritDoc} */
93 99
     @Override
94 100
     public URI getURI() {

+ 7
- 0
src/com/dmdirc/parser/interfaces/Parser.java Переглянути файл

@@ -57,6 +57,13 @@ public interface Parser {
57 57
      */
58 58
     void disconnect(String message);
59 59
 
60
+    /**
61
+     *
62
+     * Disconnect from server.  This method will wait for the server to
63
+     * close the socket.
64
+     */
65
+    void quit(String message);
66
+
60 67
     /**
61 68
      * Join a channel with no key.
62 69
      *

Завантаження…
Відмінити
Зберегти