org.apache.logging.log4j.core.net
Class DatagramSocketManager

java.lang.Object
  extended by org.apache.logging.log4j.core.appender.AbstractManager
      extended by org.apache.logging.log4j.core.appender.OutputStreamManager
          extended by org.apache.logging.log4j.core.net.AbstractSocketManager
              extended by org.apache.logging.log4j.core.net.DatagramSocketManager

public class DatagramSocketManager
extends AbstractSocketManager

Socket Manager for UDP connections.


Field Summary
 
Fields inherited from class org.apache.logging.log4j.core.net.AbstractSocketManager
host, inetAddress, port
 
Fields inherited from class org.apache.logging.log4j.core.appender.OutputStreamManager
layout
 
Fields inherited from class org.apache.logging.log4j.core.appender.AbstractManager
count, LOGGER
 
Constructor Summary
protected DatagramSocketManager(String name, OutputStream os, InetAddress inetAddress, String host, int port, Layout<? extends Serializable> layout)
          The Constructor.
 
Method Summary
 Map<String,String> getContentFormat()
          DatagramSocketManager's content format is specified by:

Key: "protocol" Value: "udp"

Key: "direction" Value: "out"

static DatagramSocketManager getSocketManager(String host, int port, Layout<? extends Serializable> layout)
          Obtain a SocketManager.
 
Methods inherited from class org.apache.logging.log4j.core.appender.OutputStreamManager
close, flush, getManager, getOutputStream, isOpen, releaseSub, setOutputStream, write, write, writeFooter
 
Methods inherited from class org.apache.logging.log4j.core.appender.AbstractManager
getCount, getName, hasManager, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatagramSocketManager

protected DatagramSocketManager(String name,
                                OutputStream os,
                                InetAddress inetAddress,
                                String host,
                                int port,
                                Layout<? extends Serializable> layout)
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 layout
Method Detail

getSocketManager

public static DatagramSocketManager getSocketManager(String host,
                                                     int port,
                                                     Layout<? extends Serializable> layout)
Obtain a SocketManager.

Parameters:
host - The host to connect to.
port - The port on the host.
layout - The layout.
Returns:
A DatagramSocketManager.

getContentFormat

public Map<String,String> getContentFormat()
DatagramSocketManager's content format is specified by:

Key: "protocol" Value: "udp"

Key: "direction" Value: "out"

Overrides:
getContentFormat in class AbstractSocketManager
Returns:
Map of content format keys supporting DatagramSocketManager


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.