|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.logging.log4j.core.LogEventListener
org.apache.logging.log4j.core.net.server.AbstractSocketServer<T>
org.apache.logging.log4j.core.net.server.UdpSocketServer<T>
T
- The kind of input stream readpublic class UdpSocketServer<T extends InputStream>
Listens for events over a socket connection.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.logging.log4j.core.net.server.AbstractSocketServer |
---|
AbstractSocketServer.ServerConfigurationFactory |
Field Summary |
---|
Fields inherited from class org.apache.logging.log4j.core.net.server.AbstractSocketServer |
---|
logEventInput, logger, MAX_PORT |
Constructor Summary | |
---|---|
UdpSocketServer(int port,
LogEventBridge<T> logEventInput)
Constructor. |
Method Summary | |
---|---|
static UdpSocketServer<InputStream> |
createJsonSocketServer(int port)
Creates a socket server that reads JSON log events. |
static UdpSocketServer<ObjectInputStream> |
createSerializedSocketServer(int port)
Creates a socket server that reads serialized log events. |
static UdpSocketServer<InputStream> |
createXmlSocketServer(int port)
Creates a socket server that reads XML log events. |
static void |
main(String[] args)
Main startup for the server. |
void |
run()
Accept incoming events and processes them. |
void |
shutdown()
Shutdown the server. |
Methods inherited from class org.apache.logging.log4j.core.net.server.AbstractSocketServer |
---|
isActive, setActive, startNewThread |
Methods inherited from class org.apache.logging.log4j.core.LogEventListener |
---|
log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UdpSocketServer(int port, LogEventBridge<T> logEventInput) throws IOException
port
- to listen on.logEventInput
-
IOException
- If an error occurs.Method Detail |
---|
public static UdpSocketServer<InputStream> createJsonSocketServer(int port) throws IOException
port
- the port to listen
IOException
- if an I/O error occurs when opening the socket.public static UdpSocketServer<ObjectInputStream> createSerializedSocketServer(int port) throws IOException
port
- the port to listen
IOException
- if an I/O error occurs when opening the socket.public static UdpSocketServer<InputStream> createXmlSocketServer(int port) throws IOException
port
- the port to listen
IOException
- if an I/O error occurs when opening the socket.public static void main(String[] args) throws Exception
args
- The command line arguments.
Exception
- if an error occurs.public void run()
public void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2014 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.