Class RemoteReceiveHandler

    • Constructor Detail

      • RemoteReceiveHandler

        public RemoteReceiveHandler()
    • Method Detail

      • setPort

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

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

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

        public int getTimeOut()
        Returns the timeout (in msec) for accepting connections.
        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.

        close in class AbstractLogHandler
        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.
        true if successfully started
      • stopListening

        public void stopListening()
        Stops the listening.
        See Also:
      • 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
        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>
        compareTo in class AbstractLogHandler
        o - the other handler
        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.
        args - optionally supplying port and timeout