java.lang.Object
io.vertx.core.AbstractVerticle
de.wuespace.telestion.services.connection.rework.tcp.TcpServer
All Implemented Interfaces:
io.vertx.core.Verticle

public final class TcpServer extends io.vertx.core.AbstractVerticle

An implementation of an unencrypted TCP-Server.

Features are:
  • Opening new connections to TCP-Clients
  • Receiving data from all the open connections
  • Keep the connections open until either no package gets sent for a certain amount of time (timeout) or the Client closes the connection
  • Sending answers back to the Client if the connections are still open
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Configuration for this Verticle which can be loaded from a config.
    An optional timeout can be specified which is the consecutive time without any packets incoming or outgoing after which a client will be disconnected.
  • Field Summary

    Fields inherited from class io.vertx.core.AbstractVerticle

    context, vertx
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
     
    void
    start​(io.vertx.core.Promise<Void> startPromise)
     
    void
    stop​(io.vertx.core.Promise<Void> stopPromise)
     

    Methods inherited from class io.vertx.core.AbstractVerticle

    config, deploymentID, getVertx, init, processArgs, start, stop

    Methods inherited from class java.lang.Object

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

  • Method Details

    • start

      public void start(io.vertx.core.Promise<Void> startPromise) throws Exception
      Specified by:
      start in interface io.vertx.core.Verticle
      Overrides:
      start in class io.vertx.core.AbstractVerticle
      Throws:
      Exception
    • stop

      public void stop(io.vertx.core.Promise<Void> stopPromise) throws Exception
      Specified by:
      stop in interface io.vertx.core.Verticle
      Overrides:
      stop in class io.vertx.core.AbstractVerticle
      Throws:
      Exception
    • getConfig

      public TcpServer.Configuration getConfig()
    • isActiveCon

      public boolean isActiveCon(Tuple<String,​Integer> key)