Class EchoServer

java.lang.Object

public class EchoServer
extends AbstractThreadedSocketServer
Echo server - concrete class implementing the operations used by TEMPLATE METHODs of AbstractThreadedSocketServer.
This socket server returns each received line immediately.
Author:
Karl Eilebrecht
  • Nested Class Summary

    Nested classes/interfaces inherited from class de.calamanari.pk.util.AbstractConsoleServer

    AbstractConsoleServer.ServerState
  • Field Summary

    Fields
    Modifier and Type Field Description
    static java.lang.String CMD_EXIT
    command to end communication
    static int DEFAULT_PORT
    default port
  • Constructor Summary

    Constructors
    Constructor Description
    EchoServer()
    Creates new instance
  • Method Summary

    Modifier and Type Method Description
    static void main​(java.lang.String[] args)
    Creates new Echo Server

    Methods inherited from class de.calamanari.pk.util.AbstractConsoleServer

    getServerName, getServerState, setupAndStart, start, stop

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • EchoServer

      public EchoServer()
      Creates new instance
  • Method Details

    • main

      public static void main​(java.lang.String[] args)
      Creates new Echo Server
      Parameters:
      args - command line arguments, arg[0]=port (optional)