org.apache.logging.log4j.core.net.server
Class AbstractSocketServer<T extends InputStream>
java.lang.Object
org.apache.logging.log4j.core.LogEventListener
org.apache.logging.log4j.core.net.server.AbstractSocketServer<T>
- Type Parameters:
T
- The kind of input stream read
TODO Make a LifeCycle
- All Implemented Interfaces:
- Runnable, EventListener
- Direct Known Subclasses:
- TcpSocketServer, UdpSocketServer
public abstract class AbstractSocketServer<T extends InputStream>
- extends LogEventListener
- implements Runnable
Abstract socket server for TCP and UDP implementations.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Runnable |
run |
MAX_PORT
protected static final int MAX_PORT
- See Also:
- Constant Field Values
logEventInput
protected final LogEventBridge<T extends InputStream> logEventInput
logger
protected final org.apache.logging.log4j.Logger logger
AbstractSocketServer
public AbstractSocketServer(int port,
LogEventBridge<T> logEventInput)
- Creates a new socket server.
- Parameters:
port
- listen to this portlogEventInput
- Use this input to read log events.
isActive
protected boolean isActive()
setActive
protected void setActive(boolean isActive)
startNewThread
public Thread startNewThread()
- Start this server in a new thread.
- Returns:
- the new thread that running this server.
Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.