This repository has been archived on 2021-12-05. You can view files and clone it, but cannot push or open issues or pull requests.
2019-12-28 14:48:39 +01:00
|
|
|
package envoy.server;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
2019-12-30 14:53:40 +01:00
|
|
|
import java.util.HashSet;
|
|
|
|
import java.util.Set;
|
2019-12-28 14:48:39 +01:00
|
|
|
|
|
|
|
import com.jenkov.nioserver.Server;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Project: <strong>envoy-server-standalone</strong><br>
|
|
|
|
* File: <strong>Startup.java</strong><br>
|
|
|
|
* Created: <strong>24.12.2019</strong><br>
|
|
|
|
*
|
|
|
|
* @author Kai S. K. Engelbart
|
|
|
|
* @since Envoy Server Standalone v0.1-alpha
|
|
|
|
*/
|
|
|
|
public class Startup {
|
|
|
|
|
|
|
|
public static void main(String[] args) throws IOException {
|
2019-12-30 14:53:40 +01:00
|
|
|
Set<ObjectProcessor<?, ?>> processors = new HashSet<>();
|
|
|
|
processors.add(new LoginCredentialProcessor());
|
|
|
|
processors.add(new MessageProcessor());
|
|
|
|
Server server = new Server(8080, () -> new ObjectMessageReader(), new ObjectMessageProcessor(processors));
|
2019-12-28 14:48:39 +01:00
|
|
|
server.start();
|
|
|
|
}
|
|
|
|
}
|