Class EchoServer

java.lang.Object
org.apache.arrow.tools.EchoServer

public class EchoServer extends Object
Simple server that echoes back data received.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Handler for each client connection to the server.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EchoServer(int port)
    Constructs a new instance that binds to the given port.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    static void
    main(String[] args)
    Main method to run the server, the first argument is an optional port number.
    int
     
    void
    run()
    Starts the main server event loop.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EchoServer

      public EchoServer(int port) throws IOException
      Constructs a new instance that binds to the given port.
      Throws:
      IOException
  • Method Details

    • main

      public static void main(String[] args) throws Exception
      Main method to run the server, the first argument is an optional port number.
      Throws:
      Exception
    • port

      public int port()
    • run

      public void run() throws IOException
      Starts the main server event loop.
      Throws:
      IOException
    • close

      public void close() throws IOException
      Throws:
      IOException