public abstract class AbstractClientServerSupport extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
AbstractClientServerSupport.ClientRequestHandler |
protected static class |
AbstractClientServerSupport.ThreadCollection |
| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
DEFAULT_DEBUG |
protected static int |
DEFAULT_PORT |
protected static boolean |
DEFAULT_RUNNING |
protected static ThreadGroup |
mainThreadGroup |
| Constructor and Description |
|---|
AbstractClientServerSupport() |
| Modifier and Type | Method and Description |
|---|---|
protected static boolean |
close(ServerSocket serverSocket) |
protected static boolean |
close(Socket socket) |
protected static ExecutorService |
createExecutor(String threadName,
boolean daemon) |
protected static String |
formatMessage(String message,
Object... arguments) |
protected static DataInput |
getInputStream(Socket socket) |
protected static DataOutput |
getOutputStream(Socket socket) |
protected static int |
getPort() |
protected static InetAddress |
getServerAddress() |
protected static boolean |
isDebug() |
protected static boolean |
isRunning() |
protected static ServerSocket |
openServerSocket(InetAddress address,
int port,
boolean reuseAddress,
int socketTimeout) |
protected static Socket |
openSocket(InetAddress address,
int port,
boolean tcpNoDelay) |
protected static void |
parseCommandLineArguments(boolean ignoreUnknownCommands,
String... args) |
protected static void |
parseCommandLineArguments(String... args) |
protected static boolean |
pause(int milliseconds) |
protected static void |
setRunning(boolean running) |
protected static void |
startServer(String serverName,
AbstractClientServerSupport.ClientRequestHandler handler) |
protected static void |
waitForUserInput(String input,
String message) |
protected static final boolean DEFAULT_DEBUG
protected static final boolean DEFAULT_RUNNING
protected static final int DEFAULT_PORT
protected static final ThreadGroup mainThreadGroup
protected static boolean isDebug()
protected static DataInput getInputStream(Socket socket) throws IOException
IOExceptionprotected static DataOutput getOutputStream(Socket socket) throws IOException
IOExceptionprotected static int getPort()
protected static boolean isRunning()
protected static void setRunning(boolean running)
protected static InetAddress getServerAddress()
protected static boolean close(ServerSocket serverSocket)
protected static boolean close(Socket socket)
protected static ExecutorService createExecutor(String threadName, boolean daemon)
protected static ServerSocket openServerSocket(InetAddress address, int port, boolean reuseAddress, int socketTimeout) throws IOException
IOExceptionprotected static Socket openSocket(InetAddress address, int port, boolean tcpNoDelay) throws IOException
IOExceptionprotected static void parseCommandLineArguments(String... args) throws Exception
Exceptionprotected static void parseCommandLineArguments(boolean ignoreUnknownCommands,
String... args)
throws Exception
Exceptionprotected static boolean pause(int milliseconds)
protected static void startServer(String serverName, AbstractClientServerSupport.ClientRequestHandler handler)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.