org.apache.log.output.net
public class DatagramOutputTarget extends AbstractOutputTarget
Modifier and Type | Field and Description |
---|---|
private static String |
DEFAULT_ENCODING |
private String |
m_encoding |
private DatagramSocket |
m_socket |
Constructor and Description |
---|
DatagramOutputTarget(InetAddress address,
int port)
Create a output target with end point specified by address and port.
|
DatagramOutputTarget(InetAddress address,
int port,
Formatter formatter)
Create a output target with end point specified by address and port.
|
DatagramOutputTarget(InetAddress address,
int port,
Formatter formatter,
String encoding)
Create a output target with end point specified by address and port.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Shutdown target.
|
protected void |
write(String stringData)
Method to write output to datagram.
|
doProcessEvent, getFormatter, open
getErrorHandler, isOpen, processEvent, setErrorHandler
private static final String DEFAULT_ENCODING
private DatagramSocket m_socket
private String m_encoding
public DatagramOutputTarget(InetAddress address, int port, Formatter formatter, String encoding) throws IOException
address
- the address endpointport
- the address portformatter
- the message formatterencoding
- the encoding to use when encoding stringIOException
- if an error occurspublic DatagramOutputTarget(InetAddress address, int port, Formatter formatter) throws IOException
address
- the address endpointport
- the address portformatter
- the message formatterIOException
- if an error occurspublic DatagramOutputTarget(InetAddress address, int port) throws IOException
address
- the address endpointport
- the address portIOException
- if an error occursprotected void write(String stringData)
write
in class AbstractOutputTarget
stringData
- the data to be outputpublic void close()
close
in interface Closeable
close
in class AbstractOutputTarget
Copyright © 2003-2004 The Apache Software Foundation. All Rights Reserved.