Merge branch 'develop' into f/compatibility_verification
Conflicts: src/main/java/envoy/client/net/Client.java src/main/java/envoy/client/net/MessageStatusChangeEventProcessor.java src/main/java/envoy/client/ui/Startup.java src/main/java/envoy/client/ui/controller/ChatScene.java src/main/java/envoy/client/ui/controller/ContactSearchScene.java src/main/java/envoy/client/ui/controller/GroupCreationScene.java src/main/java/envoy/client/ui/controller/LoginScene.java
This commit is contained in:
@@ -7,6 +7,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import envoy.client.data.Cache;
|
||||
@@ -67,8 +68,7 @@ public class Client implements Closeable {
|
||||
* from the server that can be relayed
|
||||
* after initialization
|
||||
* @throws TimeoutException if the server could not be reached
|
||||
* @throws IOException if the login credentials could not be
|
||||
* written
|
||||
* @throws IOException if the login credentials could not be written
|
||||
* @throws InterruptedException if the current thread is interrupted while
|
||||
* waiting for the handshake response
|
||||
*/
|
||||
@@ -77,9 +77,9 @@ public class Client implements Closeable {
|
||||
throws TimeoutException, IOException, InterruptedException {
|
||||
if (online) throw new IllegalStateException("Handshake has already been performed successfully");
|
||||
// Establish TCP connection
|
||||
logger.finer(String.format("Attempting connection to server %s:%d...", config.getServer(), config.getPort()));
|
||||
logger.log(Level.FINER, String.format("Attempting connection to server %s:%d...", config.getServer(), config.getPort()));
|
||||
socket = new Socket(config.getServer(), config.getPort());
|
||||
logger.fine("Successfully established TCP connection to server");
|
||||
logger.log(Level.FINE, "Successfully established TCP connection to server");
|
||||
|
||||
// Create object receiver
|
||||
receiver = new Receiver(socket.getInputStream());
|
||||
@@ -119,7 +119,7 @@ public class Client implements Closeable {
|
||||
// Remove all processors as they are only used during the handshake
|
||||
receiver.removeAllProcessors();
|
||||
|
||||
logger.info("Handshake completed.");
|
||||
logger.log(Level.INFO, "Handshake completed.");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -147,7 +147,7 @@ public class Client implements Closeable {
|
||||
checkOnline();
|
||||
|
||||
// Process incoming messages
|
||||
final ReceivedMessageProcessor receivedMessageProcessor = new ReceivedMessageProcessor();
|
||||
final ReceivedMessageProcessor receivedMessageProcessor = new ReceivedMessageProcessor();
|
||||
final MessageStatusChangeProcessor messageStatusChangeEventProcessor = new MessageStatusChangeProcessor();
|
||||
|
||||
receiver.registerProcessor(Message.class, receivedMessageProcessor);
|
||||
@@ -183,6 +183,7 @@ public class Client implements Closeable {
|
||||
sendEvent(evt.get());
|
||||
} catch (final IOException e) {
|
||||
e.printStackTrace();
|
||||
logger.log(Level.WARNING, "An error occurred when trying to send Event " + evt, e);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -229,7 +230,7 @@ public class Client implements Closeable {
|
||||
* @since Envoy Client v0.3-alpha
|
||||
*/
|
||||
public void requestIdGenerator() throws IOException {
|
||||
logger.info("Requesting new id generator...");
|
||||
logger.log(Level.INFO, "Requesting new id generator...");
|
||||
writeObject(new IDGeneratorRequest());
|
||||
}
|
||||
|
||||
@@ -251,7 +252,7 @@ public class Client implements Closeable {
|
||||
|
||||
private void writeObject(Object obj) throws IOException {
|
||||
checkOnline();
|
||||
logger.fine("Sending " + obj);
|
||||
logger.log(Level.FINE, "Sending " + obj);
|
||||
SerializationUtils.writeBytesWithLength(obj, socket.getOutputStream());
|
||||
}
|
||||
|
||||
@@ -269,7 +270,7 @@ public class Client implements Closeable {
|
||||
* @param clientUser the client user to set
|
||||
* @since Envoy Client v0.2-alpha
|
||||
*/
|
||||
public void setSender(User clientUser) { this.sender = clientUser; }
|
||||
public void setSender(User clientUser) { sender = clientUser; }
|
||||
|
||||
/**
|
||||
* @return the {@link Receiver} used by this {@link Client}
|
||||
|
Reference in New Issue
Block a user