From 4174296e607a5378eeec18c11c2d151e35aaeb81 Mon Sep 17 00:00:00 2001 From: delvh Date: Sun, 29 Dec 2019 14:16:39 +0100 Subject: [PATCH 1/4] Added method to handle incoming objects (not finished as the methods to further process these "Events" have not been implemented yet) --- .../envoy/server/ObjectMessageProcessor.java | 57 ++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/src/main/java/envoy/server/ObjectMessageProcessor.java b/src/main/java/envoy/server/ObjectMessageProcessor.java index 77a086b..8b999c2 100644 --- a/src/main/java/envoy/server/ObjectMessageProcessor.java +++ b/src/main/java/envoy/server/ObjectMessageProcessor.java @@ -1,13 +1,19 @@ package envoy.server; import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import com.jenkov.nioserver.IMessageProcessor; import com.jenkov.nioserver.Message; import com.jenkov.nioserver.WriteProxy; +import envoy.data.LoginCredentials; +import envoy.data.User; +import envoy.event.Event; + /** * Project: envoy-server-standalone
* File: ObjectMessageProcessor.java
@@ -18,14 +24,63 @@ import com.jenkov.nioserver.WriteProxy; */ public class ObjectMessageProcessor implements IMessageProcessor { + private long currentUserID = 0;// temporary + @Override public void process(Message message, WriteProxy writeProxy) { try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(message.sharedArray, message.offset + 4, message.length - 4))) { Object obj = in.readObject(); - // TODO: Process pipeline + System.out.println("Read object: " + obj.toString()); + handleObject(message, writeProxy, obj); } catch (IOException | ClassNotFoundException e) { e.printStackTrace(); } } + + /** + * This method splits incoming objects into the different objects that are + * relevant to the server and guides them to their predestined spot. + * + * @param request the {@link Message} in which the objects are saved + * @param writeProxy the writeProxy to define the resulting socket for + * @param obj the object that has been read out of the {@link Message} + * @throws IllegalArgumentException if the object given is neither an + * {@link envoy.data.Message}, an {@link Event} + * nor a {@link LoginCredentials} + * @since Envoy Server Standalone v0.1-alpha + */ + private void handleObject(Message request, WriteProxy writeProxy, Object obj) throws IllegalArgumentException { + boolean responseToSameSocket = false; + Object usage; + if (obj instanceof envoy.data.Message) {// if object is Message + envoy.data.Message cast = (envoy.data.Message) obj; + usage = cast.getClass(); + } else if (obj instanceof Event) {// if object is Event + usage = (Event) obj; + } else if (obj instanceof LoginCredentials) {// if object is LoginCredential + responseToSameSocket = true; + LoginCredentials cast = (LoginCredentials) obj; + usage = new User(currentUserID++, cast.getName()); + } else throw new IllegalArgumentException(); + + Message response = writeProxy.getMessage(); + if (responseToSameSocket) { + response.socketId = request.socketId; + } else { + response.socketId = -0;// TODO temporary.Needs to be replaced + return; + } + // Serialize object to byte array + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try (ObjectOutputStream oout = new ObjectOutputStream(baos)) { + oout.writeObject(usage); + } catch (IOException e) { + e.printStackTrace(); + } + byte[] objBytes = baos.toByteArray(); + response.writeToMessage(objBytes); + writeProxy.enqueue(response); + + } } \ No newline at end of file From caef28713756c9663f97c2cc8c7d8a5c5ae97d96 Mon Sep 17 00:00:00 2001 From: delvh Date: Sun, 29 Dec 2019 17:52:57 +0100 Subject: [PATCH 2/4] Changed code as requested by @CyB3RC0nN0R --- .../envoy/server/ObjectMessageProcessor.java | 59 ++++++++++++------- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/src/main/java/envoy/server/ObjectMessageProcessor.java b/src/main/java/envoy/server/ObjectMessageProcessor.java index 8b999c2..7c9592b 100644 --- a/src/main/java/envoy/server/ObjectMessageProcessor.java +++ b/src/main/java/envoy/server/ObjectMessageProcessor.java @@ -24,8 +24,6 @@ import envoy.event.Event; */ public class ObjectMessageProcessor implements IMessageProcessor { - private long currentUserID = 0;// temporary - @Override public void process(Message message, WriteProxy writeProxy) { try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(message.sharedArray, message.offset + 4, message.length - 4))) { @@ -51,36 +49,55 @@ public class ObjectMessageProcessor implements IMessageProcessor { * @since Envoy Server Standalone v0.1-alpha */ private void handleObject(Message request, WriteProxy writeProxy, Object obj) throws IllegalArgumentException { - boolean responseToSameSocket = false; + + long currentUserID = 0; // TODO temporary. Only for testing purposes + boolean responseToSameSocket = false, immediateResponse = true; Object usage; + + // determining the type of the incoming object if (obj instanceof envoy.data.Message) {// if object is Message envoy.data.Message cast = (envoy.data.Message) obj; - usage = cast.getClass(); + usage = cast.getClass(); + immediateResponse = isRecipientAvailable(-1); // TODO replace with wanted clientID } else if (obj instanceof Event) {// if object is Event - usage = (Event) obj; + usage = (Event) obj; + immediateResponse = isRecipientAvailable(-1); // TODO replace with wanted clientID } else if (obj instanceof LoginCredentials) {// if object is LoginCredential responseToSameSocket = true; LoginCredentials cast = (LoginCredentials) obj; usage = new User(currentUserID++, cast.getName()); } else throw new IllegalArgumentException(); - Message response = writeProxy.getMessage(); - if (responseToSameSocket) { - response.socketId = request.socketId; - } else { - response.socketId = -0;// TODO temporary.Needs to be replaced - return; + // handling of incoming object + if (immediateResponse) { + Message response = writeProxy.getMessage(); + if (responseToSameSocket) { + response.socketId = request.socketId; + } else { + response.socketId = -0;// TODO temporary.Needs to be replaced + return; + } + // Serialize object to byte array + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try (ObjectOutputStream oout = new ObjectOutputStream(baos)) { + oout.writeObject(usage); + } catch (IOException e) { + e.printStackTrace(); + } + byte[] objBytes = baos.toByteArray(); + response.writeToMessage(objBytes); + writeProxy.enqueue(response); } - // Serialize object to byte array - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - try (ObjectOutputStream oout = new ObjectOutputStream(baos)) { - oout.writeObject(usage); - } catch (IOException e) { - e.printStackTrace(); - } - byte[] objBytes = baos.toByteArray(); - response.writeToMessage(objBytes); - writeProxy.enqueue(response); + } + /** + * This method determines if the recipient is online + * + * @param otherClientID the ID of the recipient + * @return true, if the recipient is online + * @since Envoy Server Standalone v0.1-alpha + */ + private boolean isRecipientAvailable(long otherClientID) { + return false;// TODO needs to be adapted to return true if the wanted client is online } } \ No newline at end of file From 070118f612273f9f1f86d954706885154e2c3ef4 Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Mon, 30 Dec 2019 15:53:40 +0200 Subject: [PATCH 3/4] Added ObjectProcessor interface with some implementations --- .../server/LoginCredentialProcessor.java | 27 +++++ .../java/envoy/server/MessageProcessor.java | 20 ++++ .../envoy/server/ObjectMessageProcessor.java | 100 +++++------------- .../java/envoy/server/ObjectProcessor.java | 17 +++ src/main/java/envoy/server/Startup.java | 7 +- 5 files changed, 99 insertions(+), 72 deletions(-) create mode 100644 src/main/java/envoy/server/LoginCredentialProcessor.java create mode 100644 src/main/java/envoy/server/MessageProcessor.java create mode 100644 src/main/java/envoy/server/ObjectProcessor.java diff --git a/src/main/java/envoy/server/LoginCredentialProcessor.java b/src/main/java/envoy/server/LoginCredentialProcessor.java new file mode 100644 index 0000000..37f36e7 --- /dev/null +++ b/src/main/java/envoy/server/LoginCredentialProcessor.java @@ -0,0 +1,27 @@ +package envoy.server; + +import envoy.data.LoginCredentials; +import envoy.data.User; + +/** + * Project: envoy-server-standalone
+ * File: LoginCredentialProcessor.java
+ * Created: 30.12.2019
+ * + * @author Kai S. K. Engelbart + * @since + */ +public class LoginCredentialProcessor implements ObjectProcessor { + + // TODO: Acquire user IDs from database + private static long currentUserId = 1; + + @Override + public User process(LoginCredentials input) { + System.out.println("Received login credentials " + input); + return new User(currentUserId++, input.getName()); + } + + @Override + public Class getInputClass() { return LoginCredentials.class; } +} diff --git a/src/main/java/envoy/server/MessageProcessor.java b/src/main/java/envoy/server/MessageProcessor.java new file mode 100644 index 0000000..85313ca --- /dev/null +++ b/src/main/java/envoy/server/MessageProcessor.java @@ -0,0 +1,20 @@ +package envoy.server; + +import envoy.data.Message; + +/** + * Project: envoy-server-standalone
+ * File: MessageProcessor.java
+ * Created: 30.12.2019
+ * + * @author Kai S. K. Engelbart + * @since + */ +public class MessageProcessor implements ObjectProcessor { + + @Override + public Void process(Message input) { return null; } + + @Override + public Class getInputClass() { return Message.class; } +} diff --git a/src/main/java/envoy/server/ObjectMessageProcessor.java b/src/main/java/envoy/server/ObjectMessageProcessor.java index 7c9592b..8bf8ad6 100644 --- a/src/main/java/envoy/server/ObjectMessageProcessor.java +++ b/src/main/java/envoy/server/ObjectMessageProcessor.java @@ -5,15 +5,12 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.util.Set; import com.jenkov.nioserver.IMessageProcessor; import com.jenkov.nioserver.Message; import com.jenkov.nioserver.WriteProxy; -import envoy.data.LoginCredentials; -import envoy.data.User; -import envoy.event.Event; - /** * Project: envoy-server-standalone
* File: ObjectMessageProcessor.java
@@ -24,80 +21,41 @@ import envoy.event.Event; */ public class ObjectMessageProcessor implements IMessageProcessor { + private final Set> processors; + + public ObjectMessageProcessor(Set> processors) { this.processors = processors; } + + @SuppressWarnings("unchecked") @Override public void process(Message message, WriteProxy writeProxy) { try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(message.sharedArray, message.offset + 4, message.length - 4))) { Object obj = in.readObject(); - System.out.println("Read object: " + obj.toString()); - handleObject(message, writeProxy, obj); + + // Process object + processors.stream() + .filter(p -> p.getInputClass().isInstance(obj)) + .forEach((@SuppressWarnings("rawtypes") ObjectProcessor p) -> { + Object responseObj = p.process(p.getInputClass().cast(obj)); + if (responseObj != null) { + // Create message targeted at the client + Message response = writeProxy.getMessage(); + response.socketId = message.socketId; + + // Serialize object to byte array + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try (ObjectOutputStream oout = new ObjectOutputStream(baos)) { + oout.writeObject(responseObj); + } catch (IOException e) { + e.printStackTrace(); + } + byte[] objBytes = baos.toByteArray(); + response.writeToMessage(objBytes); + writeProxy.enqueue(response); + } + }); } catch (IOException | ClassNotFoundException e) { e.printStackTrace(); } } - - /** - * This method splits incoming objects into the different objects that are - * relevant to the server and guides them to their predestined spot. - * - * @param request the {@link Message} in which the objects are saved - * @param writeProxy the writeProxy to define the resulting socket for - * @param obj the object that has been read out of the {@link Message} - * @throws IllegalArgumentException if the object given is neither an - * {@link envoy.data.Message}, an {@link Event} - * nor a {@link LoginCredentials} - * @since Envoy Server Standalone v0.1-alpha - */ - private void handleObject(Message request, WriteProxy writeProxy, Object obj) throws IllegalArgumentException { - - long currentUserID = 0; // TODO temporary. Only for testing purposes - boolean responseToSameSocket = false, immediateResponse = true; - Object usage; - - // determining the type of the incoming object - if (obj instanceof envoy.data.Message) {// if object is Message - envoy.data.Message cast = (envoy.data.Message) obj; - usage = cast.getClass(); - immediateResponse = isRecipientAvailable(-1); // TODO replace with wanted clientID - } else if (obj instanceof Event) {// if object is Event - usage = (Event) obj; - immediateResponse = isRecipientAvailable(-1); // TODO replace with wanted clientID - } else if (obj instanceof LoginCredentials) {// if object is LoginCredential - responseToSameSocket = true; - LoginCredentials cast = (LoginCredentials) obj; - usage = new User(currentUserID++, cast.getName()); - } else throw new IllegalArgumentException(); - - // handling of incoming object - if (immediateResponse) { - Message response = writeProxy.getMessage(); - if (responseToSameSocket) { - response.socketId = request.socketId; - } else { - response.socketId = -0;// TODO temporary.Needs to be replaced - return; - } - // Serialize object to byte array - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - try (ObjectOutputStream oout = new ObjectOutputStream(baos)) { - oout.writeObject(usage); - } catch (IOException e) { - e.printStackTrace(); - } - byte[] objBytes = baos.toByteArray(); - response.writeToMessage(objBytes); - writeProxy.enqueue(response); - } - } - - /** - * This method determines if the recipient is online - * - * @param otherClientID the ID of the recipient - * @return true, if the recipient is online - * @since Envoy Server Standalone v0.1-alpha - */ - private boolean isRecipientAvailable(long otherClientID) { - return false;// TODO needs to be adapted to return true if the wanted client is online - } } \ No newline at end of file diff --git a/src/main/java/envoy/server/ObjectProcessor.java b/src/main/java/envoy/server/ObjectProcessor.java new file mode 100644 index 0000000..a056d64 --- /dev/null +++ b/src/main/java/envoy/server/ObjectProcessor.java @@ -0,0 +1,17 @@ +package envoy.server; + + +/** + * Project: envoy-server-standalone
+ * File: ObjectProcessor.java
+ * Created: 30.12.2019
+ * + * @author Kai S. K. Engelbart + * @since Envoy Server Standalone v0.1-alpha + */ +public interface ObjectProcessor { + + U process(T input); + + Class getInputClass(); +} \ No newline at end of file diff --git a/src/main/java/envoy/server/Startup.java b/src/main/java/envoy/server/Startup.java index 1c0932b..b389320 100644 --- a/src/main/java/envoy/server/Startup.java +++ b/src/main/java/envoy/server/Startup.java @@ -1,6 +1,8 @@ package envoy.server; import java.io.IOException; +import java.util.HashSet; +import java.util.Set; import com.jenkov.nioserver.Server; @@ -15,7 +17,10 @@ import com.jenkov.nioserver.Server; public class Startup { public static void main(String[] args) throws IOException { - Server server = new Server(8080, () -> new ObjectMessageReader(), new ObjectMessageProcessor()); + Set> processors = new HashSet<>(); + processors.add(new LoginCredentialProcessor()); + processors.add(new MessageProcessor()); + Server server = new Server(8080, () -> new ObjectMessageReader(), new ObjectMessageProcessor(processors)); server.start(); } } \ No newline at end of file From e265ef0b8f99024736dc69beba946b9928a7bbf1 Mon Sep 17 00:00:00 2001 From: delvh Date: Mon, 30 Dec 2019 15:15:25 +0100 Subject: [PATCH 4/4] Updated Javadoc --- .../server/LoginCredentialProcessor.java | 12 +++-- .../java/envoy/server/MessageProcessor.java | 10 ++-- .../envoy/server/ObjectMessageProcessor.java | 46 +++++++++++-------- .../envoy/server/ObjectMessageReader.java | 20 ++++---- .../java/envoy/server/ObjectProcessor.java | 21 +++++++-- src/main/java/envoy/server/Startup.java | 11 ++++- 6 files changed, 77 insertions(+), 43 deletions(-) diff --git a/src/main/java/envoy/server/LoginCredentialProcessor.java b/src/main/java/envoy/server/LoginCredentialProcessor.java index 37f36e7..f208a3e 100644 --- a/src/main/java/envoy/server/LoginCredentialProcessor.java +++ b/src/main/java/envoy/server/LoginCredentialProcessor.java @@ -4,24 +4,26 @@ import envoy.data.LoginCredentials; import envoy.data.User; /** + * This {@link ObjectProcessor} handles {@link LoginCredentials}.
+ *
* Project: envoy-server-standalone
* File: LoginCredentialProcessor.java
* Created: 30.12.2019
- * + * * @author Kai S. K. Engelbart - * @since + * @since Envoy Server Standalone v0.1-alpha */ public class LoginCredentialProcessor implements ObjectProcessor { // TODO: Acquire user IDs from database private static long currentUserId = 1; + @Override + public Class getInputClass() { return LoginCredentials.class; } + @Override public User process(LoginCredentials input) { System.out.println("Received login credentials " + input); return new User(currentUserId++, input.getName()); } - - @Override - public Class getInputClass() { return LoginCredentials.class; } } diff --git a/src/main/java/envoy/server/MessageProcessor.java b/src/main/java/envoy/server/MessageProcessor.java index 85313ca..ea52c55 100644 --- a/src/main/java/envoy/server/MessageProcessor.java +++ b/src/main/java/envoy/server/MessageProcessor.java @@ -3,18 +3,20 @@ package envoy.server; import envoy.data.Message; /** + * This {@link ObjectProcessor} handles incoming {@link Message}s.
+ *
* Project: envoy-server-standalone
* File: MessageProcessor.java
* Created: 30.12.2019
- * + * * @author Kai S. K. Engelbart - * @since + * @since Envoy Server Standalone v0.1-alpha */ public class MessageProcessor implements ObjectProcessor { @Override - public Void process(Message input) { return null; } + public Class getInputClass() { return Message.class; } @Override - public Class getInputClass() { return Message.class; } + public Void process(Message input) { return null; } } diff --git a/src/main/java/envoy/server/ObjectMessageProcessor.java b/src/main/java/envoy/server/ObjectMessageProcessor.java index 8bf8ad6..53e53da 100644 --- a/src/main/java/envoy/server/ObjectMessageProcessor.java +++ b/src/main/java/envoy/server/ObjectMessageProcessor.java @@ -12,10 +12,12 @@ import com.jenkov.nioserver.Message; import com.jenkov.nioserver.WriteProxy; /** + * Handles incoming objects.
+ *
* Project: envoy-server-standalone
* File: ObjectMessageProcessor.java
* Created: 28.12.2019
- * + * * @author Kai S. K. Engelbart * @since Envoy Server Standalone v0.1-alpha */ @@ -23,6 +25,12 @@ public class ObjectMessageProcessor implements IMessageProcessor { private final Set> processors; + /** + * The constructor to set the {@link ObjectProcessor}s. + * + * @param processors the {@link ObjectProcessor} to set + * @since Envoy Server Standalone v0.1-alpha + */ public ObjectMessageProcessor(Set> processors) { this.processors = processors; } @SuppressWarnings("unchecked") @@ -33,27 +41,25 @@ public class ObjectMessageProcessor implements IMessageProcessor { System.out.println("Read object: " + obj.toString()); // Process object - processors.stream() - .filter(p -> p.getInputClass().isInstance(obj)) - .forEach((@SuppressWarnings("rawtypes") ObjectProcessor p) -> { - Object responseObj = p.process(p.getInputClass().cast(obj)); - if (responseObj != null) { - // Create message targeted at the client - Message response = writeProxy.getMessage(); - response.socketId = message.socketId; + processors.stream().filter(p -> p.getInputClass().isInstance(obj)).forEach((@SuppressWarnings("rawtypes") ObjectProcessor p) -> { + Object responseObj = p.process(p.getInputClass().cast(obj)); + if (responseObj != null) { + // Create message targeted at the client + Message response = writeProxy.getMessage(); + response.socketId = message.socketId; - // Serialize object to byte array - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - try (ObjectOutputStream oout = new ObjectOutputStream(baos)) { - oout.writeObject(responseObj); - } catch (IOException e) { - e.printStackTrace(); - } - byte[] objBytes = baos.toByteArray(); - response.writeToMessage(objBytes); - writeProxy.enqueue(response); + // Serialize object to byte array + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try (ObjectOutputStream oout = new ObjectOutputStream(baos)) { + oout.writeObject(responseObj); + } catch (IOException e) { + e.printStackTrace(); } - }); + byte[] objBytes = baos.toByteArray(); + response.writeToMessage(objBytes); + writeProxy.enqueue(response); + } + }); } catch (IOException | ClassNotFoundException e) { e.printStackTrace(); } diff --git a/src/main/java/envoy/server/ObjectMessageReader.java b/src/main/java/envoy/server/ObjectMessageReader.java index 9a20c7f..f0fa73a 100644 --- a/src/main/java/envoy/server/ObjectMessageReader.java +++ b/src/main/java/envoy/server/ObjectMessageReader.java @@ -11,10 +11,12 @@ import com.jenkov.nioserver.MessageBuffer; import com.jenkov.nioserver.Socket; /** + * This {@link IMessageReader} decodes serialized Java objects.
+ *
* Project: envoy-server-standalone
* File: ObjectMessageReader.java
* Created: 28.12.2019
- * + * * @author Kai S. K. Engelbart * @since Envoy Server Standalone v0.1-alpha */ @@ -24,6 +26,14 @@ public class ObjectMessageReader implements IMessageReader { private Message nextMessage; private MessageBuffer messageBuffer; + private int fromByteArray(byte[] bytes, int offset) { + return ((bytes[offset] & 0xFF) << 24) | ((bytes[offset + 1] & 0xFF) << 16) | ((bytes[offset + 2] & 0xFF) << 8) + | ((bytes[offset + 3] & 0xFF) << 0); + } + + @Override + public List getMessages() { return completeMessages; } + @Override public void init(MessageBuffer messageBuffer) { this.messageBuffer = messageBuffer; @@ -55,12 +65,4 @@ public class ObjectMessageReader implements IMessageReader { buffer.clear(); } - - private int fromByteArray(byte[] bytes, int offset) { - return ((bytes[offset] & 0xFF) << 24) | ((bytes[offset + 1] & 0xFF) << 16) | ((bytes[offset + 2] & 0xFF) << 8) - | ((bytes[offset + 3] & 0xFF) << 0); - } - - @Override - public List getMessages() { return completeMessages; } } \ No newline at end of file diff --git a/src/main/java/envoy/server/ObjectProcessor.java b/src/main/java/envoy/server/ObjectProcessor.java index a056d64..44c07e1 100644 --- a/src/main/java/envoy/server/ObjectProcessor.java +++ b/src/main/java/envoy/server/ObjectProcessor.java @@ -1,17 +1,30 @@ package envoy.server; - /** + * This interface defines methods for processing objects of a specific + * type incoming from a client.
+ *
* Project: envoy-server-standalone
* File: ObjectProcessor.java
* Created: 30.12.2019
- * + * * @author Kai S. K. Engelbart + * @param type of the request object + * @param type of the response object * @since Envoy Server Standalone v0.1-alpha */ public interface ObjectProcessor { - U process(T input); - + /** + * @return the Class of the request object + * @since Envoy Server Standalone v0.1-alpha + */ Class getInputClass(); + + /** + * @param input the request object + * @return the response object + * @since Envoy Server Standalone v0.1-alpha + */ + U process(T input); } \ No newline at end of file diff --git a/src/main/java/envoy/server/Startup.java b/src/main/java/envoy/server/Startup.java index b389320..58a8366 100644 --- a/src/main/java/envoy/server/Startup.java +++ b/src/main/java/envoy/server/Startup.java @@ -7,15 +7,24 @@ import java.util.Set; import com.jenkov.nioserver.Server; /** + * Starts the server.
+ *
* Project: envoy-server-standalone
* File: Startup.java
* Created: 24.12.2019
- * + * * @author Kai S. K. Engelbart * @since Envoy Server Standalone v0.1-alpha */ public class Startup { + /** + * Starts the server. + * + * @param args the run configuration. Currently unused. + * @throws IOException if the server crashes + * @since Envoy Server Standalone v0.1-alpha + */ public static void main(String[] args) throws IOException { Set> processors = new HashSet<>(); processors.add(new LoginCredentialProcessor());