SocketNode based server.
<b>Usage:</b> java ch.qos.logback.classic.net.SimpleSocketServer port configFile
where port is a port number where the server listens and
configFile is an XML configuration file fed to
JoranConfigurator.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private CountDownLatch | |
| private final LoggerContext | |
| pack-priv Logger | |
| private final int | |
| private ServerSocket | |
| private List |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public static void | |
| protected static void | |
| protected String | |
| public CountDownLatch | |
| protected ServerSocketFactory | |
| protected String | |
| public boolean | |
| public static void | |
| pack-priv static int | |
| public void | run()
Overrides java. Implements java. |
| pack-priv void | |
| pack-priv void | signalAlmostReadiness()
Signal another thread that we have established a connection This is useful for testing purposes. |
| public void | |
| pack-priv static void |
| closed | back to summary |
|---|---|
| private boolean closed | |
| latch | back to summary |
|---|---|
| private CountDownLatch latch | |
| lc | back to summary |
|---|---|
| private final LoggerContext lc | |
| logger | back to summary |
|---|---|
| pack-priv Logger logger | |
| port | back to summary |
|---|---|
| private final int port | |
| serverSocket | back to summary |
|---|---|
| private ServerSocket serverSocket | |
| socketNodeList | back to summary |
|---|---|
| private List<SocketNode> socketNodeList | |
| SimpleSocketServer | back to summary |
|---|---|
| public SimpleSocketServer(LoggerContext lc, int port) | |
| close | back to summary |
|---|---|
| public void close() | |
| configureLC | back to summary |
|---|---|
| public static void configureLC(LoggerContext lc, String configFile) throws JoranException | |
| doMain | back to summary |
|---|---|
| protected static void doMain(Class<? extends SimpleSocketServer> serverClass, String[] argv) throws Exception | |
| getClientThreadName | back to summary |
|---|---|
| protected String getClientThreadName(Socket socket) Returns a name to identify each client thread. | |
| getLatch | back to summary |
|---|---|
| public CountDownLatch getLatch() Used for testing purposes | |
| getServerSocketFactory | back to summary |
|---|---|
| protected ServerSocketFactory getServerSocketFactory() Gets the platform default Subclasses may override to provide a custom server socket factory. | |
| getServerThreadName | back to summary |
|---|---|
| protected String getServerThreadName() Returns the name given to the server thread. | |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() | |
| main | back to summary |
|---|---|
| public static void main(String[] argv) throws Exception | |
| parsePortNumber | back to summary |
|---|---|
| pack-priv static int parsePortNumber(String portStr) | |
| run | back to summary |
|---|---|
| public void run() Overrides java. Implements java. Doc from java. This method is run by the thread when it executes. Subclasses of This method is not intended to be invoked directly. If this thread is a
platform thread created with a | |
| setLatch | back to summary |
|---|---|
| pack-priv void setLatch(CountDownLatch latch) Used for testing purposes | |
| signalAlmostReadiness | back to summary |
|---|---|
| pack-priv void signalAlmostReadiness() Signal another thread that we have established a connection This is useful for testing purposes. | |
| socketNodeClosing | back to summary |
|---|---|
| public void socketNodeClosing(SocketNode sn) | |
| usage | back to summary |
|---|---|
| pack-priv static void usage(String msg) | |