Class RemoteReceiveHandler

    • Constructor Detail

      • RemoteReceiveHandler

        public RemoteReceiveHandler()
    • Method Detail

      • setPort

        public void setPort​(int value)
        Sets the port to listen for data.
        Parameters:
        value - the port
      • getPort

        public int getPort()
        Returns the port to listen for data.
        Returns:
        the port
      • setTimeOut

        public void setTimeOut​(int value)
        Sets the timeout (in msec) for accepting connections.
        Parameters:
        value - the timeout (in msec)
      • getTimeOut

        public int getTimeOut()
        Returns the timeout (in msec) for accepting connections.
        Returns:
        the timeout (in msec)
      • close

        public void close()
                   throws SecurityException
        Close the Handler and free all associated resources.

        The close method will perform a flush and then close the Handler. After close has been called this Handler should no longer be used. Method calls may either be silently ignored or may throw runtime exceptions.

        Overrides:
        close in class AbstractLogHandler
        Throws:
        SecurityException - if a security manager exists and if the caller does not have LoggingPermission("control").
      • startListening

        public boolean startListening()
        Tries to start listing to the port.
        Returns:
        true if successfully started
      • stopListening

        public void stopListening()
        Stops the listening.
        See Also:
        close()
      • doPublish

        protected void doPublish​(LogRecord record)
        Publish a LogRecord.

        The logging request was made initially to a Logger object, which initialized the LogRecord and forwarded it here.

        The Handler is responsible for formatting the message, when and if necessary. The formatting should include localization.

        Specified by:
        doPublish in class AbstractLogHandler
        Parameters:
        record - description of the log event. A null record is silently ignored and is not published
      • compareTo

        public int compareTo​(Handler o)
        Compares the handler with itself.
        Specified by:
        compareTo in interface Comparable<Handler>
        Overrides:
        compareTo in class AbstractLogHandler
        Parameters:
        o - the other handler
        Returns:
        less than 0, equal to 0, or greater than 0 if the handler is less, equal to, or greater than this one
      • main

        public static void main​(String[] args)
        Just for testing.
        Parameters:
        args - optionally supplying port and timeout