org.apache.log.output.net
Class DatagramOutputTarget
java.lang.Object
|
+--org.apache.log.output.AbstractTarget
|
+--org.apache.log.output.AbstractOutputTarget
|
+--org.apache.log.output.net.DatagramOutputTarget
- All Implemented Interfaces:
- ErrorAware, LogTarget
- Direct Known Subclasses:
- DatagramOutputTarget
- public class DatagramOutputTarget
- extends AbstractOutputTarget
A datagram output target.
Useful for writing using custom protocols or writing to syslog daemons.
- Author:
- Avalon Development Team, Peter Donald
Method Summary |
void |
close()
Shutdown target. |
protected void |
write(String stringData)
Method to write output to datagram. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DatagramOutputTarget
public DatagramOutputTarget(InetAddress address,
int port,
Formatter formatter)
throws IOException
- Create a output target with end point specified by address and port.
- Parameters:
address
- the address endpointport
- the address portformatter
- the message formatter
- Throws:
IOException
- if an error occurs
DatagramOutputTarget
public DatagramOutputTarget(InetAddress address,
int port)
throws IOException
- Create a output target with end point specified by address and port.
- Parameters:
address
- the address endpointport
- the address port
- Throws:
IOException
- if an error occurs
write
protected void write(String stringData)
- Method to write output to datagram.
- Overrides:
write
in class AbstractOutputTarget
- Parameters:
stringData
- the data to be output
close
public void close()
- Shutdown target.
Attempting to write to target after close() will cause errors to be logged.
- Overrides:
close
in class AbstractOutputTarget
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.