Class DatagramSocketManager
java.lang.Object
org.apache.logging.log4j.core.appender.AbstractManager
org.apache.logging.log4j.core.appender.OutputStreamManager
org.apache.logging.log4j.core.net.AbstractSocketManager
org.apache.logging.log4j.core.net.DatagramSocketManager
- All Implemented Interfaces:
AutoCloseable,ByteBufferDestination
Socket Manager for UDP connections.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classFactory to create the DatagramSocketManager.private static classData for the factory.Nested classes/interfaces inherited from class org.apache.logging.log4j.core.appender.AbstractManager
AbstractManager.AbstractFactoryData -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DatagramSocketManager.DatagramSocketManagerFactoryFields inherited from class org.apache.logging.log4j.core.net.AbstractSocketManager
host, inetAddress, portFields inherited from class org.apache.logging.log4j.core.appender.OutputStreamManager
byteBuffer, layoutFields inherited from class org.apache.logging.log4j.core.appender.AbstractManager
count, LOGGER -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDatagramSocketManager(String name, OutputStream os, InetAddress inetAddress, String host, int port, Layout<? extends Serializable> layout, int bufferSize) The Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets this DatagramSocketManager's content format.static DatagramSocketManagergetSocketManager(String host, int port, Layout<? extends Serializable> layout, int bufferSize) Obtain a SocketManager.Methods inherited from class org.apache.logging.log4j.core.net.AbstractSocketManager
getHost, getPortMethods inherited from class org.apache.logging.log4j.core.appender.OutputStreamManager
closeOutputStream, createOutputStream, drain, flush, flushBuffer, flushDestination, getByteBuffer, getManager, getOutputStream, hasOutputStream, isOpen, releaseSub, setOutputStream, skipFooter, write, write, write, write, writeBytes, writeBytes, writeFooter, writeHeader, writeToDestinationMethods inherited from class org.apache.logging.log4j.core.appender.AbstractManager
close, getCount, getLoggerContext, getManager, getName, getStrSubstitutor, hasManager, log, logDebug, logError, logger, logWarn, narrow, release, stop, updateData
-
Field Details
-
FACTORY
-
-
Constructor Details
-
DatagramSocketManager
protected DatagramSocketManager(String name, OutputStream os, InetAddress inetAddress, String host, int port, Layout<? extends Serializable> layout, int bufferSize) The Constructor.- Parameters:
name- The unique name of the connection.os- The OutputStream.inetAddress-host- The host to connect to.port- The port on the host.layout- The layoutbufferSize- The buffer size
-
-
Method Details
-
getSocketManager
public static DatagramSocketManager getSocketManager(String host, int port, Layout<? extends Serializable> layout, int bufferSize) Obtain a SocketManager.- Parameters:
host- The host to connect to.port- The port on the host.layout- The layout.bufferSize- The buffer size.- Returns:
- A DatagramSocketManager.
-
getContentFormat
Gets this DatagramSocketManager's content format. Specified by:- Key: "protocol" Value: "udp"
- Key: "direction" Value: "out"
- Overrides:
getContentFormatin classAbstractSocketManager- Returns:
- Map of content format keys supporting DatagramSocketManager
-