Package org.apache.log4j.net
Class TelnetAppender.SocketHandler
- java.lang.Object
-
- java.lang.Thread
-
- org.apache.log4j.net.TelnetAppender.SocketHandler
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- TelnetAppender
protected class TelnetAppender.SocketHandler extends java.lang.ThreadThe SocketHandler class is used to accept connections from clients. It is threaded so that clients can connect/disconnect asynchronously.
-
-
Constructor Summary
Constructors Constructor Description SocketHandler(int port)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()make sure we close all network connections when this handler is destroyed.voidfinalize()voidrun()Continually accepts client connections.voidsend(java.lang.String message)sends a message to each of the clients in telnet-friendly output.-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Method Detail
-
finalize
public void finalize()
- Overrides:
finalizein classjava.lang.Object
-
close
public void close()
make sure we close all network connections when this handler is destroyed.- Since:
- 1.2.15
-
send
public void send(java.lang.String message)
sends a message to each of the clients in telnet-friendly output.
-
run
public void run()
Continually accepts client connections. Client connections are refused when MAX_CONNECTIONS is reached.- Specified by:
runin interfacejava.lang.Runnable- Overrides:
runin classjava.lang.Thread
-
-