public abstract class BasicServer<T extends BasicServer.Builder> extends java.lang.Object implements Server
| Modifier and Type | Class and Description |
|---|---|
protected static class |
BasicServer.Builder<T extends BasicServer.Builder,S extends BasicServer> |
Server.ProxyBuilder<T extends Server.ProxyBuilder,S extends Server>, Server.ServerListener| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isRunning |
protected java.net.InetAddress |
mInetAddress |
protected Server.ServerListener |
mListener |
protected int |
mPort |
protected javax.net.ServerSocketFactory |
mSocketFactory |
protected javax.net.ssl.SSLContext |
mSSLContext |
protected SSLSocketInitializer |
mSSLSocketInitializer |
protected int |
mTimeout |
| Modifier and Type | Method and Description |
|---|---|
java.net.InetAddress |
getInetAddress()
Get the local address of this server socket.
|
int |
getPort()
Returns the port number on which this socket is listening.
|
boolean |
isRunning()
Server running status.
|
protected abstract HttpRequestHandler |
requestHandler()
Assigns
HttpRequestHandler instance. |
void |
shutdown()
Quit the server.
|
void |
startup()
Start the server.
|
protected final java.net.InetAddress mInetAddress
protected final int mPort
protected final int mTimeout
protected final javax.net.ServerSocketFactory mSocketFactory
protected final javax.net.ssl.SSLContext mSSLContext
protected final SSLSocketInitializer mSSLSocketInitializer
protected final Server.ServerListener mListener
protected boolean isRunning
public boolean isRunning()
Serverpublic void startup()
Serverprotected abstract HttpRequestHandler requestHandler()
HttpRequestHandler instance.public java.net.InetAddress getInetAddress()
ServergetInetAddress in interface ServerInetAddress.ServerSocket.getInetAddress()public int getPort()
Server