Class DatagramOutputTarget

    • Field Detail

      • DEFAULT_ENCODING

        private static final java.lang.String DEFAULT_ENCODING
        See Also:
        Constant Field Values
      • m_socket

        private java.net.DatagramSocket m_socket
      • m_encoding

        private java.lang.String m_encoding
    • Constructor Detail

      • DatagramOutputTarget

        public DatagramOutputTarget​(java.net.InetAddress address,
                                    int port,
                                    Formatter formatter,
                                    java.lang.String encoding)
                             throws java.io.IOException
        Create a output target with end point specified by address and port.
        Parameters:
        address - the address endpoint
        port - the address port
        formatter - the message formatter
        encoding - the encoding to use when encoding string
        Throws:
        java.io.IOException - if an error occurs
      • DatagramOutputTarget

        public DatagramOutputTarget​(java.net.InetAddress address,
                                    int port,
                                    Formatter formatter)
                             throws java.io.IOException
        Create a output target with end point specified by address and port.
        Parameters:
        address - the address endpoint
        port - the address port
        formatter - the message formatter
        Throws:
        java.io.IOException - if an error occurs
      • DatagramOutputTarget

        public DatagramOutputTarget​(java.net.InetAddress address,
                                    int port)
                             throws java.io.IOException
        Create a output target with end point specified by address and port.
        Parameters:
        address - the address endpoint
        port - the address port
        Throws:
        java.io.IOException - if an error occurs
    • Method Detail

      • write

        protected void write​(java.lang.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.
        Specified by:
        close in interface Closeable
        Overrides:
        close in class AbstractOutputTarget