public class SimpleSocketServer
extends java.lang.Thread
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.| Constructor and Description |
|---|
SimpleSocketServer(LoggerContext lc,
int port) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static void |
configureLC(LoggerContext lc,
java.lang.String configFile) |
protected static void |
doMain(java.lang.Class<? extends SimpleSocketServer> serverClass,
java.lang.String[] argv) |
protected java.lang.String |
getClientThreadName(java.net.Socket socket)
Returns a name to identify each client thread.
|
java.util.concurrent.CountDownLatch |
getLatch()
Used for testing purposes
|
protected javax.net.ServerSocketFactory |
getServerSocketFactory()
Gets the platform default
ServerSocketFactory. |
protected java.lang.String |
getServerThreadName()
Returns the name given to the server thread.
|
boolean |
isClosed() |
static void |
main(java.lang.String[] argv) |
void |
run() |
void |
socketNodeClosing(SocketNode sn) |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic SimpleSocketServer(LoggerContext lc, int port)
public static void main(java.lang.String[] argv)
throws java.lang.Exception
java.lang.Exceptionprotected static void doMain(java.lang.Class<? extends SimpleSocketServer> serverClass, java.lang.String[] argv) throws java.lang.Exception
java.lang.Exceptionpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadprotected java.lang.String getServerThreadName()
protected java.lang.String getClientThreadName(java.net.Socket socket)
protected javax.net.ServerSocketFactory getServerSocketFactory()
ServerSocketFactory.
Subclasses may override to provide a custom server socket factory.
public java.util.concurrent.CountDownLatch getLatch()
public boolean isClosed()
public void close()
public void socketNodeClosing(SocketNode sn)
public static void configureLC(LoggerContext lc, java.lang.String configFile) throws ch.qos.logback.core.joran.spi.JoranException
ch.qos.logback.core.joran.spi.JoranException