|
1 | 1 | package server;
|
2 | 2 |
|
3 | 3 | import listener_references.Command;
|
4 |
| -import listener_references.ServerConnection; |
| 4 | +import listener_references.Connection; |
5 | 5 | import listener_references.Message;
|
| 6 | +import listener_references.ServerConnection; |
6 | 7 | import listeners.CommandListener;
|
7 |
| -import listeners.ServerConnectionListener; |
8 | 8 | import listeners.MessageListener;
|
| 9 | +import listeners.ServerConnectionListener; |
9 | 10 |
|
10 | 11 | import java.util.ArrayList;
|
11 | 12 | import java.util.List;
|
@@ -106,14 +107,14 @@ public synchronized void raiseMessageEvent(Message message) {
|
106 | 107 | }
|
107 | 108 |
|
108 | 109 | /**
|
109 |
| - * Runs each of the {@link ServerConnectionListener}s with the {@code connection} and {@code event} as input |
| 110 | + * Runs each of the {@link ServerConnectionListener}s with the {@code connection} and {@code Event} as input |
110 | 111 | * @param connection the {@link ServerConnection} to pass to each of the listeners
|
111 |
| - * @param event the {@link ServerConnection.event} associated with the connection |
| 112 | + * @param event the {@link Connection.Event} associated with the connection |
112 | 113 | */
|
113 |
| - public synchronized void raiseConnectionEvent(ServerConnection connection, ServerConnection.event event) { |
| 114 | + public synchronized void raiseConnectionEvent(ServerConnection connection, Connection.Event event) { |
114 | 115 | connectionListeners.forEach(listener -> executor.submit((Callable<Void>) () -> {
|
115 |
| - if (event == ServerConnection.event.CONNECTED) listener.onConnectionCreated(connection); |
116 |
| - if (event == ServerConnection.event.REMOVED) listener.onConnectionRemoved(connection); |
| 116 | + if (event == Connection.Event.CONNECTED) listener.onConnectionCreated(connection); |
| 117 | + if (event == Connection.Event.REMOVED) listener.onConnectionRemoved(connection); |
117 | 118 | return null;
|
118 | 119 | }));
|
119 | 120 | }
|
|
0 commit comments