Class TelnetDefaultHandler

  • All Implemented Interfaces:
    java.lang.Runnable

    public class TelnetDefaultHandler
    extends TelnetServer.Handler
    This is the default telnet handler class.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void handle​(java.io.BufferedReader STDIN, java.io.PrintWriter STDOUT)
      Executes the handling code in a loop until the connection is closed.
      TelnetServer.Handler newHandler​(java.net.Socket Socket, TelnetServer Service)
      Make a new server handler instance.
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TelnetDefaultHandler

        public TelnetDefaultHandler​(java.net.Socket Socket,
                                    TelnetServer Service)
    • Method Detail

      • handle

        public void handle​(java.io.BufferedReader STDIN,
                           java.io.PrintWriter STDOUT)
                    throws java.io.IOException
        Description copied from class: TelnetServer.Handler
        Executes the handling code in a loop until the connection is closed.
        Specified by:
        handle in class TelnetServer.Handler
        Parameters:
        STDIN - The standard input stream.
        STDOUT - The standard output stream.
        Throws:
        java.io.IOException - Raised mostly from trying to write or read from STDIN/OUT when the connection has been closed.