public class DatagramOutputTarget extends AbstractOutputTarget
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
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 © 1997–2022. All rights reserved.