Browse Source

Weaken Server to Connection in a few places.

pull/379/head
Chris Smith 9 years ago
parent
commit
b4f9dde276
2 changed files with 10 additions and 9 deletions
  1. 7
    6
      src/com/dmdirc/ServerStatus.java
  2. 3
    3
      src/com/dmdirc/events/ServerNumericEvent.java

+ 7
- 6
src/com/dmdirc/ServerStatus.java View File

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc;
24 24
 
25
+import com.dmdirc.interfaces.Connection;
25 26
 import com.dmdirc.parser.interfaces.Parser;
26 27
 import com.dmdirc.util.collections.RollingList;
27 28
 
@@ -35,8 +36,8 @@ import java.util.List;
35 36
  */
36 37
 public class ServerStatus {
37 38
 
38
-    /** The server to which this status belongs. */
39
-    private final Server server;
39
+    /** The connection to which this status belongs. */
40
+    private final Connection connection;
40 41
     /** Object to notify when the state of the server changes. */
41 42
     private final Object notifier;
42 43
     /** The current state of the server. */
@@ -49,13 +50,13 @@ public class ServerStatus {
49 50
     /**
50 51
      * Creates a new ServerStatus instance for the specified server.
51 52
      *
52
-     * @param server   The server to which this status belongs
53
+     * @param connection   The connection to which this status belongs
53 54
      * @param notifier The object to notify when the state changes
54 55
      *
55 56
      * @since 0.6.3
56 57
      */
57
-    public ServerStatus(final Server server, final Object notifier) {
58
-        this.server = server;
58
+    public ServerStatus(final Connection connection, final Object notifier) {
59
+        this.connection = connection;
59 60
         this.notifier = notifier;
60 61
     }
61 62
 
@@ -108,7 +109,7 @@ public class ServerStatus {
108 109
         builder.append(" [");
109 110
         builder.append(Thread.currentThread().getName());
110 111
         builder.append("] (parser #");
111
-        builder.append(getParserID(server.getParser().orElse(null)));
112
+        builder.append(getParserID(connection.getParser().orElse(null)));
112 113
         builder.append(')');
113 114
 
114 115
         history.add(builder.toString());

+ 3
- 3
src/com/dmdirc/events/ServerNumericEvent.java View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 package com.dmdirc.events;
24 24
 
25
-import com.dmdirc.Server;
25
+import com.dmdirc.interfaces.Connection;
26 26
 
27 27
 /**
28 28
  * Event raised when a server numeric occurs.
@@ -32,14 +32,14 @@ public class ServerNumericEvent extends ServerDisplayableEvent {
32 32
     private final int numeric;
33 33
     private final String[] args;
34 34
 
35
-    public ServerNumericEvent(final long timestamp, final Server server, final int numeric,
35
+    public ServerNumericEvent(final long timestamp, final Connection server, final int numeric,
36 36
             final String[] args) {
37 37
         super(timestamp, server);
38 38
         this.numeric = numeric;
39 39
         this.args = args;
40 40
     }
41 41
 
42
-    public ServerNumericEvent(final Server server, final int numeric, final String[] args) {
42
+    public ServerNumericEvent(final Connection server, final int numeric, final String[] args) {
43 43
         super(server);
44 44
         this.numeric = numeric;
45 45
         this.args = args;

Loading…
Cancel
Save