org.zodiac.sdk.nio.http.HttpMain Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zodiac-sdk-nio Show documentation
Show all versions of zodiac-sdk-nio Show documentation
Zodiac SDK NIO2(New Non-Blocking IO)
package org.zodiac.sdk.nio.http;
import java.util.Arrays;
import org.zodiac.sdk.nio.http.client.ClientEntryPoint;
import org.zodiac.sdk.nio.http.server.ServerEntryPoint;
public class HttpMain {
public static void main(final String[] args) {
if (!Arrays.asList(args).isEmpty()) {
final String command = args[0];
switch (command) {
case NioHttpConstants.HTTPC:
ClientEntryPoint.entryPoint(args);
break;
case NioHttpConstants.HTTPFS:
ServerEntryPoint.entryPoint(args);
break;
default:
throw new IllegalArgumentException("Not a valid command.");
}
}
}
}